diff --git a/Cargo.toml b/Cargo.toml index 96b00b5..fabea4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ members = ["googleapis", "googleapis-raw"] resolver = "2" [workspace.package] -version = "0.16.1" # don't forget to update `./googleapis/Cargo.toml` +version = "0.17.1-beta.3" # don't forget to update `./googleapis/Cargo.toml` authors = [ "Ferrous Systems", "Mozilla Services Engineering ", @@ -29,11 +29,15 @@ repository = "https://github.com/mozilla-services/mozilla-rust-sdk/" edition = "2021" [workspace.dependencies] -futures = "0.3.5" +futures = "0.3" # Absolutely lock to these versions of grpcio and protobuf with a `=` prefix # Not providing that lock means that cargo will "helpfully" update beyond those # versions because versions are a suggestion, not a rule. # NOTE: update the versions in `README.md` as well. -grpcio = { version = "=0.13.0" } +grpcio = { version = "0.13.0", default-features = false, features = [ + "boringssl", + "protobufv3-codec", +] } # grpcio currently does NOT support protobuf 3+ -protobuf = { version = "=2.28.0" } +# protobuf = { version = "=2.28.0" } +protobuf = { version = "=3.4.0" } # locked by grpcio-compiler 0.13 diff --git a/googleapis-raw/Cargo.toml b/googleapis-raw/Cargo.toml index 160a985..8961f32 100644 --- a/googleapis-raw/Cargo.toml +++ b/googleapis-raw/Cargo.toml @@ -36,6 +36,7 @@ slog-term = "2.6" slog-stdlog = "4.0" slog-async = "2.5" log = "0.4" +protobuf-codegen = "3.4.0" # limited by grpcio-compiler [features] default = ["spanner"] diff --git a/googleapis-raw/examples/bigtable-helloworld.rs b/googleapis-raw/examples/bigtable-helloworld.rs index 6fdd7b1..8761938 100644 --- a/googleapis-raw/examples/bigtable-helloworld.rs +++ b/googleapis-raw/examples/bigtable-helloworld.rs @@ -17,6 +17,7 @@ use std::sync::Arc; use std::time::{SystemTime, UNIX_EPOCH}; use futures::executor::block_on; +// use futures::StreamExt; use google_cloud_rust_raw::bigtable::admin::v2::{ bigtable_instance_admin::GetClusterRequest, bigtable_instance_admin_grpc::BigtableInstanceAdminClient, @@ -25,13 +26,17 @@ use google_cloud_rust_raw::bigtable::admin::v2::{ instance::Cluster, table::ColumnFamily, table::GcRule, table::Table, }; use google_cloud_rust_raw::bigtable::v2::{ - bigtable::MutateRowsRequest, bigtable::MutateRowsRequest_Entry, bigtable_grpc::BigtableClient, - data::Mutation, data::Mutation_SetCell, + bigtable::mutate_rows_request::Entry, data::mutation::SetCell, data::Mutation, }; +/* +use google_cloud_rust_raw::bigtable::v2::{ + bigtable::MutateRowResponse, bigtable::MutateRowsRequest, bigtable_grpc::BigtableClient, +}; +*/ use google_cloud_rust_raw::empty::Empty; use grpcio::{Channel, ChannelBuilder, ChannelCredentials, ClientUnaryReceiver, EnvBuilder}; -use protobuf::well_known_types::Duration; -use protobuf::RepeatedField; +use protobuf::well_known_types::duration::Duration; +use protobuf::MessageField; #[allow(dead_code)] fn timestamp() -> u128 { @@ -65,8 +70,10 @@ fn get_cluster( cluster_id: &str, ) -> ::grpcio::Result { println!("Get cluster information"); - let mut request = GetClusterRequest::new(); - request.set_name(cluster_id.to_string()); + let request = GetClusterRequest { + name: cluster_id.to_string(), + ..Default::default() + }; client.get_cluster(&request) } @@ -74,12 +81,14 @@ fn get_cluster( /// fn list_tables(client: &BigtableTableAdminClient, instance_id: &str) { println!("List all existing tables"); - let mut request = ListTablesRequest::new(); - request.set_parent(instance_id.to_string()); + let request = ListTablesRequest { + parent: instance_id.to_string(), + ..Default::default() + }; match client.list_tables(&request) { Ok(response) => { response - .get_tables() + .tables .iter() .for_each(|table| println!(" table: {:?}", table)); } @@ -96,10 +105,12 @@ fn create_table( table: Table, ) -> ::grpcio::Result { println!("Creating table {}", table_name); - let mut request = CreateTableRequest::new(); - request.set_parent(instance_id.to_string()); - request.set_table(table); - request.set_table_id("hello-world".to_string()); + let request = CreateTableRequest { + parent: instance_id.to_string(), + table: MessageField::some(table), + table_id: "hello-world".to_string(), + ..Default::default() + }; client.create_table(&request) } @@ -109,8 +120,10 @@ fn delete_table_async( table_name: &str, ) -> grpcio::Result> { println!("Deleting the {} table", table_name); - let mut request = DeleteTableRequest::new(); - request.set_name(table_name.to_string()); + let request = DeleteTableRequest { + name: table_name.to_string(), + ..Default::default() + }; client.delete_table_async(&request) } @@ -123,8 +136,6 @@ async fn async_main() { 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 @@ -135,10 +146,10 @@ async fn async_main() { // Create a Bigtable client. let channel = connect(admin_endpoint); - let client = BigtableInstanceAdminClient::new(channel.clone()); + let admin_client = BigtableInstanceAdminClient::new(channel.clone()); // display cluster information - let cluster = get_cluster(&client, &cluster_id).unwrap(); + let cluster = get_cluster(&admin_client, &cluster_id).unwrap(); dbg!(cluster); // create admin client for tables @@ -148,17 +159,23 @@ async fn async_main() { 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 duration = Duration { + seconds: 60 * 60 * 24 * 5, + ..Default::default() + }; 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 column_family = ColumnFamily { + gc_rule: MessageField::some(gc_rule), + ..Default::default() + }; 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); + let table = Table { + column_families: hash_map, + ..Default::default() + }; match create_table(&admin_client, &instance_id, &table_name, table) { Ok(table) => println!(" table {:?} created", table), Err(error) => println!(" failed to created table: {}", error), @@ -173,38 +190,45 @@ async fn async_main() { 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 set_cell = SetCell { + column_qualifier: column.to_string().into_bytes(), + timestamp_micros: -1, + value: greeting.to_string().into_bytes(), + family_name: column_family_id.to_string(), + ..Default::default() + }; 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])); + let entry = Entry { + row_key: row_key.into_bytes(), + mutations: vec![mutation], + ..Default::default() + }; - mutation_requests.push(request); + mutation_requests.push(entry); } + // TODO:: fix this.admin_client + // `.collect()` needs a type. + // apply changes and check responses + /* 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)); + let request = MutateRowsRequest { + table_name: table_name.to_string(), + entries: mutation_requests, + ..Default::default() + }; - /* - TODO:: fix this.admin_client - `.collect()` needs a type. - // apply changes and check responses + let client = BigtableClient::new(channel.clone()); let response = client - .mutate_rows(&request).unwrap() - .collect() - .into_future() - .wait().unwrap(); + .mutate_rows(&request) + .unwrap() + .collect::>>() + .await + .unwrap(); for response in response.iter() { for entry in response.get_entries().iter() { let status = entry.get_status(); diff --git a/googleapis-raw/examples/cloudasset-list.rs b/googleapis-raw/examples/cloudasset-list.rs index e07269e..854ef8b 100644 --- a/googleapis-raw/examples/cloudasset-list.rs +++ b/googleapis-raw/examples/cloudasset-list.rs @@ -1,13 +1,11 @@ use std::sync::Arc; use google_cloud_rust_raw::cloud::asset::v1::{ - asset_service_grpc::AssetServiceClient, - asset_service::ExportAssetsRequest, + asset_service::ExportAssetsRequest, asset_service_grpc::AssetServiceClient, }; use grpcio::{Channel, ChannelBuilder, ChannelCredentials, EnvBuilder}; use std::error::Error; - fn connect(endpoint: &str) -> Channel { // Set up the gRPC environment. let env = Arc::new(EnvBuilder::new().build()); @@ -28,15 +26,17 @@ fn main() -> Result<(), Box> { let channel = connect(endpoint); let client = AssetServiceClient::new(channel); - let mut req = ExportAssetsRequest::new(); - req.set_parent(format!("projects/{}", "mozilla-rust-sdk-dev")); + let req = ExportAssetsRequest { + parent: format!("projects/{}", "mozilla-rust-sdk-dev"), + ..Default::default() + }; match client.export_assets(&req) { Ok(response) => { // NOTE: the API for this recently changd. Please refer to // GCP documentation for details about these changes. print!("{:?}", response); - }, + } Err(error) => println!("Failed to list assets: {}", error), } diff --git a/googleapis-raw/examples/pubsub-publisher.rs b/googleapis-raw/examples/pubsub-publisher.rs index 20b12a6..e34404f 100644 --- a/googleapis-raw/examples/pubsub-publisher.rs +++ b/googleapis-raw/examples/pubsub-publisher.rs @@ -24,17 +24,19 @@ use google_cloud_rust_raw::pubsub::v1::{ pubsub::Topic, pubsub_grpc::PublisherClient, pubsub_grpc::SubscriberClient, }; use grpcio::{Channel, ChannelBuilder, ChannelCredentials, ClientUnaryReceiver, EnvBuilder}; -use protobuf::RepeatedField; +use protobuf::{well_known_types::duration::Duration, MessageField}; /// Creates a topic or finds an existing one, then returns the topic /// fn find_or_create_topic(client: &PublisherClient, topic_name: &str) -> ::grpcio::Result { // find topic println!("Finding topic {}", topic_name); - let mut request = GetTopicRequest::new(); - request.set_topic(topic_name.to_string()); + let request = GetTopicRequest { + topic: topic_name.to_string(), + ..Default::default() + }; if let Ok(topic) = client.get_topic(&request) { - println!("Found topic: {}", topic.get_name()); + println!("Found topic: {}", topic.name); return Ok(topic); } else { println!("Topic not found"); @@ -44,9 +46,11 @@ fn find_or_create_topic(client: &PublisherClient, topic_name: &str) -> ::grpcio: 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); + let topic = Topic { + name: topic_name.to_string(), + labels, + ..Default::default() + }; client.create_topic(&topic) } @@ -62,10 +66,12 @@ fn find_or_create_subscription( "Finding subscription {} for topic {}", subscription_name, topic_name ); - let mut request = GetSubscriptionRequest::new(); - request.set_subscription(subscription_name.to_string()); + let request = GetSubscriptionRequest { + subscription: subscription_name.to_string(), + ..Default::default() + }; if let Ok(subscription) = client.get_subscription(&request) { - println!("Found subscription: {}", subscription.get_name()); + println!("Found subscription: {}", subscription.name); return Ok(subscription); } else { println!("Subscription not found"); @@ -77,16 +83,26 @@ fn find_or_create_subscription( 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); - subscription.set_name(subscription_name.to_string()); - subscription.set_topic(topic_name.to_string()); - subscription.set_ack_deadline_seconds(20); + let expiration_duration = Duration { + seconds: (60 * 60 * 48), + ..Default::default() + }; + let expiration_policy = ExpirationPolicy { + ttl: protobuf::MessageField(Some(Box::new(expiration_duration))), + ..Default::default() + }; + let push_config = PushConfig { + attributes, + ..Default::default() + }; + let subscription = Subscription { + name: subscription_name.to_string(), + topic: topic_name.to_string(), + ack_deadline_seconds: 20, + expiration_policy: MessageField(Some(Box::new(expiration_policy))), + push_config: MessageField(Some(Box::new(push_config))), + ..Default::default() + }; // subscription.set_expiration_policy(expiration_policy); // subscription.set_message_retention_duration(expiration_duration.clone()); // subscription.set_push_config(push_config); @@ -106,12 +122,16 @@ fn timestamp_in_seconds() -> u64 { /// 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); + let timestamp = ::protobuf::well_known_types::timestamp::Timestamp { + seconds: timestamp_in_seconds() as i64, + ..Default::default() + }; + + let pubsub_msg = PubsubMessage { + data: message.to_owned().into_bytes(), + publish_time: protobuf::MessageField(Some(Box::new(timestamp))), + ..Default::default() + }; pubsub_msg } @@ -124,9 +144,11 @@ fn publish_msg_async( ) -> ::grpcio::Result> { 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)); + let request = PublishRequest { + topic: topic.name.to_string(), + messages: pub_messages, + ..Default::default() + }; client.publish_async(&request) } @@ -179,23 +201,27 @@ async fn async_main() { // 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); + let request = PullRequest { + subscription: subscription_name.to_string(), + max_messages: 10, + ..Default::default() + }; loop { let future = subscriber.pull_async(&request).unwrap(); let response = future.await.unwrap(); - let pubsub_messages = response.get_received_messages(); + let pubsub_messages = response.received_messages; println!("Handling {} messages", pubsub_messages.len()); - for pubsub_message in pubsub_messages { + for pubsub_message in pubsub_messages.clone() { println!(" >> message: {:?}", pubsub_message); - let ack_id = pubsub_message.get_ack_id().to_string(); + let ack_id = pubsub_message.ack_id; - let mut request = AcknowledgeRequest::new(); - request.set_subscription(subscription_name.to_string()); - request.set_ack_ids(RepeatedField::from_vec(vec![ack_id])); + let request = AcknowledgeRequest { + subscription: subscription_name.clone(), + ack_ids: vec![ack_id], + ..Default::default() + }; subscriber.acknowledge(&request).unwrap(); } diff --git a/googleapis-raw/examples/spanner-db.rs b/googleapis-raw/examples/spanner-db.rs index 9a4008a..d3abab9 100644 --- a/googleapis-raw/examples/spanner-db.rs +++ b/googleapis-raw/examples/spanner-db.rs @@ -19,18 +19,20 @@ use google_cloud_rust_raw::spanner::admin::database::v1::{ spanner_database_admin::CreateDatabaseRequest, spanner_database_admin::DropDatabaseRequest, spanner_database_admin::GetDatabaseRequest, spanner_database_admin_grpc::DatabaseAdminClient, }; +use google_cloud_rust_raw::spanner::v1::transaction::transaction_options::{Mode, ReadWrite}; use google_cloud_rust_raw::spanner::v1::{ - mutation::Mutation, mutation::Mutation_Write, spanner::BeginTransactionRequest, - spanner::CommitRequest, spanner::CreateSessionRequest, spanner::Session, - spanner_grpc::SpannerClient, transaction::TransactionOptions, - transaction::TransactionOptions_ReadWrite, + mutation::mutation::Write, + mutation::Mutation, + spanner::{BeginTransactionRequest, CommitRequest, CreateSessionRequest, Session}, + spanner_grpc::SpannerClient, + transaction::TransactionOptions, }; use grpcio::{ CallOption, Channel, ChannelBuilder, ChannelCredentials, ClientUnaryReceiver, EnvBuilder, MetadataBuilder, }; -use protobuf::well_known_types::{ListValue, Value}; -use protobuf::RepeatedField; +use protobuf::well_known_types::struct_::{ListValue, Value}; +use protobuf::MessageField; #[allow(unused_imports)] use std::error::Error; use std::sync::Arc; @@ -65,14 +67,16 @@ struct Singer { 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()); + let request = GetOperationRequest { + name: operation.to_string(), + ..Default::default() + }; loop { println!("Checking operation: {}", operation); match operations_client.get_operation(&request) { Ok(response) => { - if response.get_done() { + if response.done { println!("Operation {} finished", operation); break; } @@ -95,10 +99,12 @@ fn create_database_if_not_exists(channel: &Channel, database_name: &str, instanc 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()); + let request = GetDatabaseRequest { + name: database_name.to_string(), + ..Default::default() + }; if let Ok(database) = client.get_database(&request) { - println!("Found database: {}", database.get_name()); + println!("Found database: {}", database.name); return; } else { println!("Database not found"); @@ -111,17 +117,19 @@ fn create_database_if_not_exists(channel: &Channel, database_name: &str, instanc .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 request = CreateDatabaseRequest { + parent: instance_id.to_string(), + create_statement: CREATE_DATABASE.to_string(), + extra_statements: vec![statements], + ..Default::default() + }; 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()); + wait_operation_finished(&channel, &operation.name); } /// Deletes a given database @@ -134,8 +142,10 @@ fn drop_database( println!("Drop database {}", database_name); let client = DatabaseAdminClient::new(channel.clone()); - let mut request = DropDatabaseRequest::new(); - request.set_database(database_name.to_string()); + let request = DropDatabaseRequest { + database: database_name.to_string(), + ..Default::default() + }; client.drop_database_async(&request) } @@ -143,8 +153,10 @@ fn drop_database( /// Create a new session to communicate with Spanner /// fn create_session(client: &SpannerClient, database_name: &str) -> ::grpcio::Result { - let mut request = CreateSessionRequest::new(); - request.set_database(database_name.to_string()); + let request = CreateSessionRequest { + database: database_name.to_string(), + ..Default::default() + }; let mut meta = MetadataBuilder::new(); meta.add_str("google-cloud-resource-prefix", database_name) .expect("Failed to set meta data"); @@ -194,11 +206,15 @@ fn main() -> Result<(), Box> { // insert data into database by using a transaction let client = SpannerClient::new(channel); - 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 read_write = TransactionOptions { + mode: Some(Mode::ReadWrite(ReadWrite::default())), + ..Default::default() + }; + let request = BeginTransactionRequest { + session: session.name.to_string(), + options: MessageField::from(Some(read_write)), + ..Default::default() + }; let transaction = client.begin_transaction(&request)?; // the list of singers to add @@ -245,28 +261,43 @@ fn main() -> Result<(), Box> { 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])); + let list = ListValue { + values: vec![id, first_name, last_name], + ..Default::default() + }; 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()); - + */ + let mutation_write = Write { + table: "Singers".to_string(), + columns, + values: list_values, + ..Default::default() + }; // 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 commit = CommitRequest { + session: session.name.clone(), + mutations: vec![mutation], + transaction: Some( + google_cloud_rust_raw::spanner::v1::spanner::commit_request::Transaction::TransactionId( + transaction.id, + ), + ), + ..Default::default() + }; let response = client.commit(&commit)?; dbg!(response); diff --git a/googleapis-raw/examples/spanner-query.rs b/googleapis-raw/examples/spanner-query.rs index 6496635..74c7c6b 100644 --- a/googleapis-raw/examples/spanner-query.rs +++ b/googleapis-raw/examples/spanner-query.rs @@ -52,7 +52,7 @@ async fn async_main() { // Prepare a SQL command to execute. let mut req = ExecuteSqlRequest::new(); - req.session = session.get_name().to_string(); + req.session = session.name; req.sql = "select * from planets".to_string(); // Execute the command synchronously. diff --git a/googleapis-raw/generate.sh b/googleapis-raw/generate.sh deleted file mode 100755 index 923d208..0000000 --- a/googleapis-raw/generate.sh +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/bash -# -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# *NOTE*: Make sure to update cargo plugins after protobuf updates -# cargo install grpcio-compiler -# cargo install protobuf-codegen -# May need to delete the ./src/*/[^(mod)].rs to force regeneration of files -# (deleting the mod.rs files will require adding `pub (crate)mod crate::*` -# cross referencing.) -set -e -cd "$(dirname "$0")" - -## remove old files: -echo "Purging old files..." -find src -name "*.rs" -and -not \( -name "mod.rs" -or -name "lib.rs" \) -print -delete - -## updating plugins -echo "Updating cargo..." -cargo update -echo "Updating plugin..." -# Lock on 2.28.0 until grpcio supports 3+ -cargo install protobuf-codegen --version 2.28.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" -# comment out to work on master... -# 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 - -#storage_dirs=" -#storage/v1 -#" - -# Big table has dependencies on "ruby_package" -big_table_dirs=" -bigtable/admin/v2 -bigtable/v2 -" - -# Spanner specific dependencies -spanner_dirs=" -spanner/admin/database/v1 -spanner/admin/instance/v1 -spanner/v1 -" - -# The following directories should correspond with the ones defined under -# `grpc/third_party/googleapis/google` and contain the various, required `.proto` -# definition files that should be read and generated from. -# *NOTE:* These often require some manual editing, since there's no way to automatically -# determine what to use. Basically, when you generate, you may see some undefined -# items and you get to go hunting for what they might be. (Often, looking at another -# library can help determine paths.) -proto_dirs=" -api -api/servicecontrol/v1 -api/servicemanagement/v1 -cloud/asset/v1 -cloud/orgpolicy/v1 -cloud/orgpolicy/v2 -cloud/osconfig/v1 -cloud/osconfig/v1alpha -cloud/osconfig/agentendpoint/v1 -logging/type -type -iam/v1 -identity/accesscontextmanager/v1 -identity/accesscontextmanager/type -longrunning -pubsub/v1 -pubsub/v1beta2 -rpc -$big_table_dirs -$storage_dirs -$spanner_dirs -" - -# obsolete proto: -# cloud/orgpolicy/v1 -# cloud/osconfig/v1 -# logging -# identity/accesscontextmanager/v1 -# identity/accesscontextmanager/type - - -# The following are required to support Spanner only -reduced_proto_dirs=" -iam/v1 -longrunning -rpc -spanner/admin/database/v1 -spanner/admin/instance/v1 -spanner/v1 -" -SRC_ROOT=$PWD - - -for dir in $proto_dirs; do - mkdir -p "$SRC_ROOT/src/$dir" - echo "Processing: $dir..." - - for proto in `find $apis/google/$dir/*.proto`; do - echo "Processing: $proto ..." - protoc \ - --rust_out="$SRC_ROOT/src/$dir" \ - --grpc_out="$SRC_ROOT/src/$dir" \ - --plugin=protoc-gen-grpc="`which grpc_rust_plugin`" \ - --proto_path="$apis:grpc/third_party/upb:grpc/third_party/protobuf/src/:" \ - $proto - done -done - -echo "Make sure you generate the mod.rs files!" - -# under `../tools/mod_updater` is a python script that can automatically try to genereate the -# mod files. It's not perfect, but it works. You'll still need to add some of the foreign references -# that can crop up during builds. (e.g. if you get missing references to `empty`, you need to add -# `pub(crate) use crate::empty;` to the `mod.rs` file. Finding other references can be a bit of a -# challenge, but it's possible.) - -# ls -1 --color=never . |grep -v mod |sed "s/\.rs//" |sed "s/^/pub mod /" | sed "s/$/;/" > mod.rs \; --print -# echo "pub(crate) use crate::empty;" >> */v1/mod.rs diff --git a/googleapis-raw/grpc b/googleapis-raw/grpc index 65d4df2..2525988 160000 --- a/googleapis-raw/grpc +++ b/googleapis-raw/grpc @@ -1 +1 @@ -Subproject commit 65d4df25edd4307e9dd40b899bdccd0ae302553f +Subproject commit 2525988afacdb4eb9327fb97f5fe5d7b6ee3bfea diff --git a/googleapis-raw/mod.rs b/googleapis-raw/mod.rs index 584f5a7..7c6e106 100644 --- a/googleapis-raw/mod.rs +++ b/googleapis-raw/mod.rs @@ -1,3 +1,3 @@ pub mod examples; -pub mod grpc; +// pub mod grpc; pub mod src; diff --git a/googleapis-raw/prepare.sh b/googleapis-raw/prepare.sh index 4f0a74e..131ffd3 100755 --- a/googleapis-raw/prepare.sh +++ b/googleapis-raw/prepare.sh @@ -4,9 +4,10 @@ # remove all auto-generated rust files. # The `mod.rs` & `lib.rs` files are NOT generated by `generate.sh` # -cargo install grpcio-compiler --version 0.13.0 -## lock on 2.28.0 until grpcio supports 3+ -cargo install protobuf-codegen --version 2.28.0 +#cargo install grpcio-compiler --version 0.13.0 +cargo install grpcio-compiler +#cargo install protobuf-codegen --version 2.28.0 +cargo install protobuf-codegen --version 3.4.0 find src -name "*.rs" -and -not \( -name "mod.rs" -or -name "lib.rs" \) -print -delete echo "REMEMBER to: " echo " [ ] update 'src/lib.rs' _PROTOBUF_VERSION_CHECK to the latest version number" diff --git a/googleapis-raw/src/api/annotations.rs b/googleapis-raw/src/api/annotations.rs index cf1f299..b35ea98 100644 --- a/googleapis-raw/src/api/annotations.rs +++ b/googleapis-raw/src/api/annotations.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,25 +9,26 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/annotations.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; /// Extension fields pub mod exts { - pub const http: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MethodOptions, ::protobuf::types::ProtobufTypeMessage> = ::protobuf::ext::ExtFieldOptional { field_number: 72295728, phantom: ::std::marker::PhantomData }; + pub const http: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MethodOptions, super::super::http::HttpRule> = ::protobuf::ext::ExtFieldOptional::new(72295728, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_MESSAGE); } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -36,7 +38,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ hodOptionsR\x04httpBn\n\x0ecom.google.apiB\x10AnnotationsProtoP\x01ZAgoo\ gle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\ \x04GAPIJ\xa9\x06\n\x06\x12\x04\x0e\0\x1e\x01\n\xbc\x04\n\x01\x0c\x12\ - \x03\x0e\0\x122\xb1\x04\x20Copyright\x202015\x20Google\x20LLC\n\n\x20Lic\ + \x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20Google\x20LLC\n\n\x20Lic\ ensed\x20under\x20the\x20Apache\x20License,\x20Version\x202.0\x20(the\ \x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\x20file\x20excep\ t\x20in\x20compliance\x20with\x20the\x20License.\n\x20You\x20may\x20obta\ @@ -60,14 +62,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \n\n\n\x03\x07\0\x03\x12\x03\x1d\x12\x1ab\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(2); + deps.push(super::http::file_descriptor().clone()); + deps.push(::protobuf::descriptor::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(0); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/auth.rs b/googleapis-raw/src/api/auth.rs index 2a75081..e6cbf7a 100644 --- a/googleapis-raw/src/api/auth.rs +++ b/googleapis-raw/src/api/auth.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,29 +9,37 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/auth.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Authentication) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Authentication { // message fields - pub rules: ::protobuf::RepeatedField, - pub providers: ::protobuf::RepeatedField, + /// A list of authentication rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + // @@protoc_insertion_point(field:google.api.Authentication.rules) + pub rules: ::std::vec::Vec, + /// Defines a set of authentication providers that a service supports. + // @@protoc_insertion_point(field:google.api.Authentication.providers) + pub providers: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Authentication.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Authentication { @@ -44,84 +53,45 @@ impl Authentication { ::std::default::Default::default() } - // repeated .google.api.AuthenticationRule rules = 3; - - - pub fn get_rules(&self) -> &[AuthenticationRule] { - &self.rules - } - pub fn clear_rules(&mut self) { - self.rules.clear(); - } - - // Param is passed by value, moved - pub fn set_rules(&mut self, v: ::protobuf::RepeatedField) { - self.rules = v; - } - - // Mutable pointer to the field. - pub fn mut_rules(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.rules - } - - // Take field - pub fn take_rules(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.rules, ::protobuf::RepeatedField::new()) - } - - // repeated .google.api.AuthProvider providers = 4; - - - pub fn get_providers(&self) -> &[AuthProvider] { - &self.providers - } - pub fn clear_providers(&mut self) { - self.providers.clear(); - } - - // Param is passed by value, moved - pub fn set_providers(&mut self, v: ::protobuf::RepeatedField) { - self.providers = v; - } - - // Mutable pointer to the field. - pub fn mut_providers(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.providers - } - - // Take field - pub fn take_providers(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.providers, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "rules", + |m: &Authentication| { &m.rules }, + |m: &mut Authentication| { &mut m.rules }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "providers", + |m: &Authentication| { &m.providers }, + |m: &mut Authentication| { &mut m.providers }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Authentication", + fields, + oneofs, + ) } } impl ::protobuf::Message for Authentication { + const NAME: &'static str = "Authentication"; + fn is_initialized(&self) -> bool { - for v in &self.rules { - if !v.is_initialized() { - return false; - } - }; - for v in &self.providers { - 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 { - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.rules)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 26 => { + self.rules.push(is.read_message()?); }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.providers)?; + 34 => { + self.providers.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -130,124 +100,109 @@ impl ::protobuf::Message for Authentication { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.rules { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for value in &self.providers { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.rules { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; }; for v in &self.providers { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Authentication { Authentication::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rules", - |m: &Authentication| { &m.rules }, - |m: &mut Authentication| { &mut m.rules }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "providers", - |m: &Authentication| { &m.providers }, - |m: &mut Authentication| { &mut m.providers }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Authentication", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.rules.clear(); + self.providers.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Authentication { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Authentication::new) + static instance: Authentication = Authentication { + rules: ::std::vec::Vec::new(), + providers: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Authentication { - fn clear(&mut self) { - self.rules.clear(); - self.providers.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Authentication { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Authentication").unwrap()).clone() } } -impl ::std::fmt::Debug for Authentication { +impl ::std::fmt::Display for Authentication { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Authentication { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Authentication rules for the service. +/// +/// By default, if a method has any authentication requirements, every request +/// must include a valid credential matching one of the requirements. +/// It's an error to include more than one kind of credential in a single +/// request. +/// +/// If a method doesn't have any auth requirements, request credentials will be +/// ignored. +// @@protoc_insertion_point(message:google.api.AuthenticationRule) +#[derive(PartialEq,Clone,Default,Debug)] pub struct AuthenticationRule { // message fields + /// Selects the methods to which this rule applies. + /// + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax + /// details. + // @@protoc_insertion_point(field:google.api.AuthenticationRule.selector) pub selector: ::std::string::String, - pub oauth: ::protobuf::SingularPtrField, + /// The requirements for OAuth credentials. + // @@protoc_insertion_point(field:google.api.AuthenticationRule.oauth) + pub oauth: ::protobuf::MessageField, + /// If true, the service accepts API keys without any other credential. + /// This flag only applies to HTTP and gRPC requests. + // @@protoc_insertion_point(field:google.api.AuthenticationRule.allow_without_credential) pub allow_without_credential: bool, - pub requirements: ::protobuf::RepeatedField, + /// Requirements for additional authentication providers. + // @@protoc_insertion_point(field:google.api.AuthenticationRule.requirements) + pub requirements: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.AuthenticationRule.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AuthenticationRule { @@ -261,143 +216,61 @@ impl AuthenticationRule { ::std::default::Default::default() } - // string selector = 1; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - - // .google.api.OAuthRequirements oauth = 2; - - - pub fn get_oauth(&self) -> &OAuthRequirements { - self.oauth.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_oauth(&mut self) { - self.oauth.clear(); - } - - pub fn has_oauth(&self) -> bool { - self.oauth.is_some() - } - - // Param is passed by value, moved - pub fn set_oauth(&mut self, v: OAuthRequirements) { - self.oauth = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oauth(&mut self) -> &mut OAuthRequirements { - if self.oauth.is_none() { - self.oauth.set_default(); - } - self.oauth.as_mut().unwrap() - } - - // Take field - pub fn take_oauth(&mut self) -> OAuthRequirements { - self.oauth.take().unwrap_or_else(|| OAuthRequirements::new()) - } - - // bool allow_without_credential = 5; - - - pub fn get_allow_without_credential(&self) -> bool { - self.allow_without_credential - } - pub fn clear_allow_without_credential(&mut self) { - self.allow_without_credential = false; - } - - // Param is passed by value, moved - pub fn set_allow_without_credential(&mut self, v: bool) { - self.allow_without_credential = v; - } - - // repeated .google.api.AuthRequirement requirements = 7; - - - pub fn get_requirements(&self) -> &[AuthRequirement] { - &self.requirements - } - pub fn clear_requirements(&mut self) { - self.requirements.clear(); - } - - // Param is passed by value, moved - pub fn set_requirements(&mut self, v: ::protobuf::RepeatedField) { - self.requirements = v; - } - - // Mutable pointer to the field. - pub fn mut_requirements(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.requirements - } - - // Take field - pub fn take_requirements(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.requirements, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(4); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &AuthenticationRule| { &m.selector }, + |m: &mut AuthenticationRule| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, OAuthRequirements>( + "oauth", + |m: &AuthenticationRule| { &m.oauth }, + |m: &mut AuthenticationRule| { &mut m.oauth }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "allow_without_credential", + |m: &AuthenticationRule| { &m.allow_without_credential }, + |m: &mut AuthenticationRule| { &mut m.allow_without_credential }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "requirements", + |m: &AuthenticationRule| { &m.requirements }, + |m: &mut AuthenticationRule| { &mut m.requirements }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "AuthenticationRule", + fields, + oneofs, + ) } } impl ::protobuf::Message for AuthenticationRule { + const NAME: &'static str = "AuthenticationRule"; + fn is_initialized(&self) -> bool { - for v in &self.oauth { - if !v.is_initialized() { - return false; - } - }; - for v in &self.requirements { - 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.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.selector = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.oauth)?; + 18 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.oauth)?; }, - 5 => { - 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.allow_without_credential = tmp; + 40 => { + self.allow_without_credential = is.read_bool()?; }, - 7 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.requirements)?; + 58 => { + self.requirements.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -406,147 +279,113 @@ impl ::protobuf::Message for AuthenticationRule { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.selector); } - if let Some(ref v) = self.oauth.as_ref() { + if let Some(v) = self.oauth.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if self.allow_without_credential != false { - my_size += 2; + my_size += 1 + 1; } for value in &self.requirements { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(1, &self.selector)?; } - if let Some(ref v) = self.oauth.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(v) = self.oauth.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } if self.allow_without_credential != false { os.write_bool(5, self.allow_without_credential)?; } for v in &self.requirements { - os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> AuthenticationRule { AuthenticationRule::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &AuthenticationRule| { &m.selector }, - |m: &mut AuthenticationRule| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "oauth", - |m: &AuthenticationRule| { &m.oauth }, - |m: &mut AuthenticationRule| { &mut m.oauth }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "allow_without_credential", - |m: &AuthenticationRule| { &m.allow_without_credential }, - |m: &mut AuthenticationRule| { &mut m.allow_without_credential }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "requirements", - |m: &AuthenticationRule| { &m.requirements }, - |m: &mut AuthenticationRule| { &mut m.requirements }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "AuthenticationRule", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.selector.clear(); + self.oauth.clear(); + self.allow_without_credential = false; + self.requirements.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static AuthenticationRule { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(AuthenticationRule::new) + static instance: AuthenticationRule = AuthenticationRule { + selector: ::std::string::String::new(), + oauth: ::protobuf::MessageField::none(), + allow_without_credential: false, + requirements: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for AuthenticationRule { - fn clear(&mut self) { - self.selector.clear(); - self.oauth.clear(); - self.allow_without_credential = false; - self.requirements.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for AuthenticationRule { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("AuthenticationRule").unwrap()).clone() } } -impl ::std::fmt::Debug for AuthenticationRule { +impl ::std::fmt::Display for AuthenticationRule { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AuthenticationRule { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Specifies a location to extract JWT from an API request. +// @@protoc_insertion_point(message:google.api.JwtLocation) +#[derive(PartialEq,Clone,Default,Debug)] pub struct JwtLocation { // message fields + /// The value prefix. The value format is "value_prefix{token}" + /// Only applies to "in" header type. Must be empty for "in" query type. + /// If not empty, the header value has to match (case sensitive) this prefix. + /// If not matched, JWT will not be extracted. If matched, JWT will be + /// extracted after the prefix is removed. + /// + /// For example, for "Authorization: Bearer {JWT}", + /// value_prefix="Bearer " with a space at the end. + // @@protoc_insertion_point(field:google.api.JwtLocation.value_prefix) pub value_prefix: ::std::string::String, // message oneof groups - pub field_in: ::std::option::Option, + pub in_: ::std::option::Option, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.JwtLocation.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a JwtLocation { @@ -555,13 +394,6 @@ impl<'a> ::std::default::Default for &'a JwtLocation { } } -#[derive(Clone,PartialEq,Debug)] -pub enum JwtLocation_oneof_in { - header(::std::string::String), - query(::std::string::String), - cookie(::std::string::String), -} - impl JwtLocation { pub fn new() -> JwtLocation { ::std::default::Default::default() @@ -569,37 +401,37 @@ impl JwtLocation { // string header = 1; - - pub fn get_header(&self) -> &str { - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::header(ref v)) => v, + pub fn header(&self) -> &str { + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Header(ref v)) => v, _ => "", } } + pub fn clear_header(&mut self) { - self.field_in = ::std::option::Option::None; + self.in_ = ::std::option::Option::None; } pub fn has_header(&self) -> bool { - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::header(..)) => true, + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Header(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_header(&mut self, v: ::std::string::String) { - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::header(v)) + self.in_ = ::std::option::Option::Some(jwt_location::In::Header(v)) } // Mutable pointer to the field. pub fn mut_header(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(JwtLocation_oneof_in::header(_)) = self.field_in { + if let ::std::option::Option::Some(jwt_location::In::Header(_)) = self.in_ { } else { - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::header(::std::string::String::new())); + self.in_ = ::std::option::Option::Some(jwt_location::In::Header(::std::string::String::new())); } - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::header(ref mut v)) => v, + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Header(ref mut v)) => v, _ => panic!(), } } @@ -607,8 +439,8 @@ impl JwtLocation { // Take field pub fn take_header(&mut self) -> ::std::string::String { if self.has_header() { - match self.field_in.take() { - ::std::option::Option::Some(JwtLocation_oneof_in::header(v)) => v, + match self.in_.take() { + ::std::option::Option::Some(jwt_location::In::Header(v)) => v, _ => panic!(), } } else { @@ -618,37 +450,37 @@ impl JwtLocation { // string query = 2; - - pub fn get_query(&self) -> &str { - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::query(ref v)) => v, + pub fn query(&self) -> &str { + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Query(ref v)) => v, _ => "", } } + pub fn clear_query(&mut self) { - self.field_in = ::std::option::Option::None; + self.in_ = ::std::option::Option::None; } pub fn has_query(&self) -> bool { - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::query(..)) => true, + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Query(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_query(&mut self, v: ::std::string::String) { - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::query(v)) + self.in_ = ::std::option::Option::Some(jwt_location::In::Query(v)) } // Mutable pointer to the field. pub fn mut_query(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(JwtLocation_oneof_in::query(_)) = self.field_in { + if let ::std::option::Option::Some(jwt_location::In::Query(_)) = self.in_ { } else { - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::query(::std::string::String::new())); + self.in_ = ::std::option::Option::Some(jwt_location::In::Query(::std::string::String::new())); } - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::query(ref mut v)) => v, + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Query(ref mut v)) => v, _ => panic!(), } } @@ -656,8 +488,8 @@ impl JwtLocation { // Take field pub fn take_query(&mut self) -> ::std::string::String { if self.has_query() { - match self.field_in.take() { - ::std::option::Option::Some(JwtLocation_oneof_in::query(v)) => v, + match self.in_.take() { + ::std::option::Option::Some(jwt_location::In::Query(v)) => v, _ => panic!(), } } else { @@ -667,37 +499,37 @@ impl JwtLocation { // string cookie = 4; - - pub fn get_cookie(&self) -> &str { - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::cookie(ref v)) => v, + pub fn cookie(&self) -> &str { + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Cookie(ref v)) => v, _ => "", } } + pub fn clear_cookie(&mut self) { - self.field_in = ::std::option::Option::None; + self.in_ = ::std::option::Option::None; } pub fn has_cookie(&self) -> bool { - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::cookie(..)) => true, + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Cookie(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_cookie(&mut self, v: ::std::string::String) { - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::cookie(v)) + self.in_ = ::std::option::Option::Some(jwt_location::In::Cookie(v)) } // Mutable pointer to the field. pub fn mut_cookie(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(JwtLocation_oneof_in::cookie(_)) = self.field_in { + if let ::std::option::Option::Some(jwt_location::In::Cookie(_)) = self.in_ { } else { - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::cookie(::std::string::String::new())); + self.in_ = ::std::option::Option::Some(jwt_location::In::Cookie(::std::string::String::new())); } - match self.field_in { - ::std::option::Option::Some(JwtLocation_oneof_in::cookie(ref mut v)) => v, + match self.in_ { + ::std::option::Option::Some(jwt_location::In::Cookie(ref mut v)) => v, _ => panic!(), } } @@ -705,8 +537,8 @@ impl JwtLocation { // Take field pub fn take_cookie(&mut self) -> ::std::string::String { if self.has_cookie() { - match self.field_in.take() { - ::std::option::Option::Some(JwtLocation_oneof_in::cookie(v)) => v, + match self.in_.take() { + ::std::option::Option::Some(jwt_location::In::Cookie(v)) => v, _ => panic!(), } } else { @@ -714,65 +546,65 @@ impl JwtLocation { } } - // string value_prefix = 3; - - - pub fn get_value_prefix(&self) -> &str { - &self.value_prefix - } - pub fn clear_value_prefix(&mut self) { - self.value_prefix.clear(); - } - - // Param is passed by value, moved - pub fn set_value_prefix(&mut self, v: ::std::string::String) { - self.value_prefix = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value_prefix(&mut self) -> &mut ::std::string::String { - &mut self.value_prefix - } - - // Take field - pub fn take_value_prefix(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value_prefix, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(4); + let mut oneofs = ::std::vec::Vec::with_capacity(1); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "header", + JwtLocation::has_header, + JwtLocation::header, + JwtLocation::set_header, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "query", + JwtLocation::has_query, + JwtLocation::query, + JwtLocation::set_query, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "cookie", + JwtLocation::has_cookie, + JwtLocation::cookie, + JwtLocation::set_cookie, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "value_prefix", + |m: &JwtLocation| { &m.value_prefix }, + |m: &mut JwtLocation| { &mut m.value_prefix }, + )); + oneofs.push(jwt_location::In::generated_oneof_descriptor_data()); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "JwtLocation", + fields, + oneofs, + ) } } impl ::protobuf::Message for JwtLocation { + const NAME: &'static str = "JwtLocation"; + 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 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::header(is.read_string()?)); + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.in_ = ::std::option::Option::Some(jwt_location::In::Header(is.read_string()?)); }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::query(is.read_string()?)); + 18 => { + self.in_ = ::std::option::Option::Some(jwt_location::In::Query(is.read_string()?)); }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.field_in = ::std::option::Option::Some(JwtLocation_oneof_in::cookie(is.read_string()?)); + 34 => { + self.in_ = ::std::option::Option::Some(jwt_location::In::Cookie(is.read_string()?)); }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value_prefix)?; + 26 => { + self.value_prefix = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -781,152 +613,163 @@ impl ::protobuf::Message for JwtLocation { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.value_prefix.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.value_prefix); } - if let ::std::option::Option::Some(ref v) = self.field_in { + if let ::std::option::Option::Some(ref v) = self.in_ { match v { - &JwtLocation_oneof_in::header(ref v) => { + &jwt_location::In::Header(ref v) => { my_size += ::protobuf::rt::string_size(1, &v); }, - &JwtLocation_oneof_in::query(ref v) => { + &jwt_location::In::Query(ref v) => { my_size += ::protobuf::rt::string_size(2, &v); }, - &JwtLocation_oneof_in::cookie(ref v) => { + &jwt_location::In::Cookie(ref v) => { my_size += ::protobuf::rt::string_size(4, &v); }, }; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.value_prefix.is_empty() { os.write_string(3, &self.value_prefix)?; } - if let ::std::option::Option::Some(ref v) = self.field_in { + if let ::std::option::Option::Some(ref v) = self.in_ { match v { - &JwtLocation_oneof_in::header(ref v) => { + &jwt_location::In::Header(ref v) => { os.write_string(1, v)?; }, - &JwtLocation_oneof_in::query(ref v) => { + &jwt_location::In::Query(ref v) => { os.write_string(2, v)?; }, - &JwtLocation_oneof_in::cookie(ref v) => { + &jwt_location::In::Cookie(ref v) => { os.write_string(4, v)?; }, }; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> JwtLocation { JwtLocation::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "header", - JwtLocation::has_header, - JwtLocation::get_header, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "query", - JwtLocation::has_query, - JwtLocation::get_query, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "cookie", - JwtLocation::has_cookie, - JwtLocation::get_cookie, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value_prefix", - |m: &JwtLocation| { &m.value_prefix }, - |m: &mut JwtLocation| { &mut m.value_prefix }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "JwtLocation", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.in_ = ::std::option::Option::None; + self.in_ = ::std::option::Option::None; + self.in_ = ::std::option::Option::None; + self.value_prefix.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static JwtLocation { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(JwtLocation::new) + static instance: JwtLocation = JwtLocation { + value_prefix: ::std::string::String::new(), + in_: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for JwtLocation { - fn clear(&mut self) { - self.field_in = ::std::option::Option::None; - self.field_in = ::std::option::Option::None; - self.field_in = ::std::option::Option::None; - self.value_prefix.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for JwtLocation { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("JwtLocation").unwrap()).clone() } } -impl ::std::fmt::Debug for JwtLocation { +impl ::std::fmt::Display for JwtLocation { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for JwtLocation { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +/// Nested message and enums of message `JwtLocation` +pub mod jwt_location { + + #[derive(Clone,PartialEq,Debug)] + #[non_exhaustive] + // @@protoc_insertion_point(oneof:google.api.JwtLocation.in) + pub enum In { + // @@protoc_insertion_point(oneof_field:google.api.JwtLocation.header) + Header(::std::string::String), + // @@protoc_insertion_point(oneof_field:google.api.JwtLocation.query) + Query(::std::string::String), + // @@protoc_insertion_point(oneof_field:google.api.JwtLocation.cookie) + Cookie(::std::string::String), + } + + impl ::protobuf::Oneof for In { + } + + impl ::protobuf::OneofFull for In { + fn descriptor() -> ::protobuf::reflect::OneofDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| ::descriptor().oneof_by_name("in").unwrap()).clone() + } + } + + impl In { + pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { + ::protobuf::reflect::GeneratedOneofDescriptorData::new::("in") + } } } -#[derive(PartialEq,Clone,Default)] +/// Configuration for an authentication provider, including support for +/// [JSON Web Token +/// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +// @@protoc_insertion_point(message:google.api.AuthProvider) +#[derive(PartialEq,Clone,Default,Debug)] pub struct AuthProvider { // message fields + /// The unique identifier of the auth provider. It will be referred to by + /// `AuthRequirement.provider_id`. + /// + /// Example: "bookstore_auth". + // @@protoc_insertion_point(field:google.api.AuthProvider.id) pub id: ::std::string::String, + /// Identifies the principal that issued the JWT. See + /// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 + /// Usually a URL or an email address. + /// + /// Example: https://securetoken.google.com + /// Example: 1234567-compute@developer.gserviceaccount.com + // @@protoc_insertion_point(field:google.api.AuthProvider.issuer) pub issuer: ::std::string::String, + // @@protoc_insertion_point(field:google.api.AuthProvider.jwks_uri) pub jwks_uri: ::std::string::String, + // @@protoc_insertion_point(field:google.api.AuthProvider.audiences) pub audiences: ::std::string::String, + /// Redirect URL if JWT token is required but not present or is expired. + /// Implement authorizationUrl of securityDefinitions in OpenAPI spec. + // @@protoc_insertion_point(field:google.api.AuthProvider.authorization_url) pub authorization_url: ::std::string::String, - pub jwt_locations: ::protobuf::RepeatedField, + // @@protoc_insertion_point(field:google.api.AuthProvider.jwt_locations) + pub jwt_locations: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.AuthProvider.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AuthProvider { @@ -940,196 +783,77 @@ impl AuthProvider { ::std::default::Default::default() } - // string id = 1; - - - pub fn get_id(&self) -> &str { - &self.id - } - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string issuer = 2; - - - pub fn get_issuer(&self) -> &str { - &self.issuer - } - pub fn clear_issuer(&mut self) { - self.issuer.clear(); - } - - // Param is passed by value, moved - pub fn set_issuer(&mut self, v: ::std::string::String) { - self.issuer = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_issuer(&mut self) -> &mut ::std::string::String { - &mut self.issuer - } - - // Take field - pub fn take_issuer(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.issuer, ::std::string::String::new()) - } - - // string jwks_uri = 3; - - - pub fn get_jwks_uri(&self) -> &str { - &self.jwks_uri - } - pub fn clear_jwks_uri(&mut self) { - self.jwks_uri.clear(); - } - - // Param is passed by value, moved - pub fn set_jwks_uri(&mut self, v: ::std::string::String) { - self.jwks_uri = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_jwks_uri(&mut self) -> &mut ::std::string::String { - &mut self.jwks_uri - } - - // Take field - pub fn take_jwks_uri(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.jwks_uri, ::std::string::String::new()) - } - - // string audiences = 4; - - - pub fn get_audiences(&self) -> &str { - &self.audiences - } - pub fn clear_audiences(&mut self) { - self.audiences.clear(); - } - - // Param is passed by value, moved - pub fn set_audiences(&mut self, v: ::std::string::String) { - self.audiences = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_audiences(&mut self) -> &mut ::std::string::String { - &mut self.audiences - } - - // Take field - pub fn take_audiences(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.audiences, ::std::string::String::new()) - } - - // string authorization_url = 5; - - - pub fn get_authorization_url(&self) -> &str { - &self.authorization_url - } - pub fn clear_authorization_url(&mut self) { - self.authorization_url.clear(); - } - - // Param is passed by value, moved - pub fn set_authorization_url(&mut self, v: ::std::string::String) { - self.authorization_url = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_authorization_url(&mut self) -> &mut ::std::string::String { - &mut self.authorization_url - } - - // Take field - pub fn take_authorization_url(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.authorization_url, ::std::string::String::new()) - } - - // repeated .google.api.JwtLocation jwt_locations = 6; - - - pub fn get_jwt_locations(&self) -> &[JwtLocation] { - &self.jwt_locations - } - pub fn clear_jwt_locations(&mut self) { - self.jwt_locations.clear(); - } - - // Param is passed by value, moved - pub fn set_jwt_locations(&mut self, v: ::protobuf::RepeatedField) { - self.jwt_locations = v; - } - - // Mutable pointer to the field. - pub fn mut_jwt_locations(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.jwt_locations - } - - // Take field - pub fn take_jwt_locations(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.jwt_locations, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(6); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "id", + |m: &AuthProvider| { &m.id }, + |m: &mut AuthProvider| { &mut m.id }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "issuer", + |m: &AuthProvider| { &m.issuer }, + |m: &mut AuthProvider| { &mut m.issuer }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "jwks_uri", + |m: &AuthProvider| { &m.jwks_uri }, + |m: &mut AuthProvider| { &mut m.jwks_uri }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "audiences", + |m: &AuthProvider| { &m.audiences }, + |m: &mut AuthProvider| { &mut m.audiences }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "authorization_url", + |m: &AuthProvider| { &m.authorization_url }, + |m: &mut AuthProvider| { &mut m.authorization_url }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "jwt_locations", + |m: &AuthProvider| { &m.jwt_locations }, + |m: &mut AuthProvider| { &mut m.jwt_locations }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "AuthProvider", + fields, + oneofs, + ) } } impl ::protobuf::Message for AuthProvider { + const NAME: &'static str = "AuthProvider"; + fn is_initialized(&self) -> bool { - for v in &self.jwt_locations { - 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.id)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.id = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.issuer)?; + 18 => { + self.issuer = is.read_string()?; }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.jwks_uri)?; + 26 => { + self.jwks_uri = is.read_string()?; }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.audiences)?; + 34 => { + self.audiences = is.read_string()?; }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.authorization_url)?; + 42 => { + self.authorization_url = is.read_string()?; }, - 6 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.jwt_locations)?; + 50 => { + self.jwt_locations.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1138,7 +862,7 @@ impl ::protobuf::Message for AuthProvider { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.id.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.id); @@ -1157,14 +881,14 @@ impl ::protobuf::Message for AuthProvider { } for value in &self.jwt_locations { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.id.is_empty() { os.write_string(1, &self.id)?; } @@ -1181,93 +905,24 @@ impl ::protobuf::Message for AuthProvider { os.write_string(5, &self.authorization_url)?; } for v in &self.jwt_locations { - os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> AuthProvider { AuthProvider::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "id", - |m: &AuthProvider| { &m.id }, - |m: &mut AuthProvider| { &mut m.id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "issuer", - |m: &AuthProvider| { &m.issuer }, - |m: &mut AuthProvider| { &mut m.issuer }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "jwks_uri", - |m: &AuthProvider| { &m.jwks_uri }, - |m: &mut AuthProvider| { &mut m.jwks_uri }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "audiences", - |m: &AuthProvider| { &m.audiences }, - |m: &mut AuthProvider| { &mut m.audiences }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "authorization_url", - |m: &AuthProvider| { &m.authorization_url }, - |m: &mut AuthProvider| { &mut m.authorization_url }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "jwt_locations", - |m: &AuthProvider| { &m.jwt_locations }, - |m: &mut AuthProvider| { &mut m.jwt_locations }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "AuthProvider", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static AuthProvider { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(AuthProvider::new) - } -} - -impl ::protobuf::Clear for AuthProvider { fn clear(&mut self) { self.id.clear(); self.issuer.clear(); @@ -1275,29 +930,67 @@ impl ::protobuf::Clear for AuthProvider { self.audiences.clear(); self.authorization_url.clear(); self.jwt_locations.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static AuthProvider { + static instance: AuthProvider = AuthProvider { + id: ::std::string::String::new(), + issuer: ::std::string::String::new(), + jwks_uri: ::std::string::String::new(), + audiences: ::std::string::String::new(), + authorization_url: ::std::string::String::new(), + jwt_locations: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for AuthProvider { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("AuthProvider").unwrap()).clone() } } -impl ::std::fmt::Debug for AuthProvider { +impl ::std::fmt::Display for AuthProvider { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AuthProvider { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// OAuth scopes are a way to define data and permissions on data. For example, +/// there are scopes defined for "Read-only access to Google Calendar" and +/// "Access to Cloud Platform". Users can consent to a scope for an application, +/// giving it permission to access that data on their behalf. +/// +/// OAuth scope specifications should be fairly coarse grained; a user will need +/// to see and understand the text description of what your scope means. +/// +/// In most cases: use one or at most two OAuth scopes for an entire family of +/// products. If your product has multiple APIs, you should probably be sharing +/// the OAuth scope across all of those APIs. +/// +/// When you need finer grained OAuth consent screens: talk with your product +/// management about how developers will use them in practice. +/// +/// Please note that even though each of the canonical scopes is enough for a +/// request to be accepted and passed to the backend, a request can still fail +/// due to the backend requiring additional scopes or permissions. +// @@protoc_insertion_point(message:google.api.OAuthRequirements) +#[derive(PartialEq,Clone,Default,Debug)] pub struct OAuthRequirements { // message fields + // @@protoc_insertion_point(field:google.api.OAuthRequirements.canonical_scopes) pub canonical_scopes: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.OAuthRequirements.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a OAuthRequirements { @@ -1311,47 +1004,37 @@ impl OAuthRequirements { ::std::default::Default::default() } - // string canonical_scopes = 1; - - - pub fn get_canonical_scopes(&self) -> &str { - &self.canonical_scopes - } - pub fn clear_canonical_scopes(&mut self) { - self.canonical_scopes.clear(); - } - - // Param is passed by value, moved - pub fn set_canonical_scopes(&mut self, v: ::std::string::String) { - self.canonical_scopes = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_canonical_scopes(&mut self) -> &mut ::std::string::String { - &mut self.canonical_scopes - } - - // Take field - pub fn take_canonical_scopes(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.canonical_scopes, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "canonical_scopes", + |m: &OAuthRequirements| { &m.canonical_scopes }, + |m: &mut OAuthRequirements| { &mut m.canonical_scopes }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "OAuthRequirements", + fields, + oneofs, + ) } } impl ::protobuf::Message for OAuthRequirements { + const NAME: &'static str = "OAuthRequirements"; + 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.canonical_scopes)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.canonical_scopes = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1360,104 +1043,81 @@ impl ::protobuf::Message for OAuthRequirements { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.canonical_scopes.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.canonical_scopes); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.canonical_scopes.is_empty() { os.write_string(1, &self.canonical_scopes)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> OAuthRequirements { OAuthRequirements::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "canonical_scopes", - |m: &OAuthRequirements| { &m.canonical_scopes }, - |m: &mut OAuthRequirements| { &mut m.canonical_scopes }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "OAuthRequirements", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.canonical_scopes.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static OAuthRequirements { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(OAuthRequirements::new) + static instance: OAuthRequirements = OAuthRequirements { + canonical_scopes: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for OAuthRequirements { - fn clear(&mut self) { - self.canonical_scopes.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for OAuthRequirements { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("OAuthRequirements").unwrap()).clone() } } -impl ::std::fmt::Debug for OAuthRequirements { +impl ::std::fmt::Display for OAuthRequirements { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for OAuthRequirements { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// User-defined authentication requirements, including support for +/// [JSON Web Token +/// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +// @@protoc_insertion_point(message:google.api.AuthRequirement) +#[derive(PartialEq,Clone,Default,Debug)] pub struct AuthRequirement { // message fields + // @@protoc_insertion_point(field:google.api.AuthRequirement.provider_id) pub provider_id: ::std::string::String, + // @@protoc_insertion_point(field:google.api.AuthRequirement.audiences) pub audiences: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.AuthRequirement.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AuthRequirement { @@ -1471,76 +1131,45 @@ impl AuthRequirement { ::std::default::Default::default() } - // string provider_id = 1; - - - pub fn get_provider_id(&self) -> &str { - &self.provider_id - } - pub fn clear_provider_id(&mut self) { - self.provider_id.clear(); - } - - // Param is passed by value, moved - pub fn set_provider_id(&mut self, v: ::std::string::String) { - self.provider_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_provider_id(&mut self) -> &mut ::std::string::String { - &mut self.provider_id - } - - // Take field - pub fn take_provider_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.provider_id, ::std::string::String::new()) - } - - // string audiences = 2; - - - pub fn get_audiences(&self) -> &str { - &self.audiences - } - pub fn clear_audiences(&mut self) { - self.audiences.clear(); - } - - // Param is passed by value, moved - pub fn set_audiences(&mut self, v: ::std::string::String) { - self.audiences = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_audiences(&mut self) -> &mut ::std::string::String { - &mut self.audiences - } - - // Take field - pub fn take_audiences(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.audiences, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "provider_id", + |m: &AuthRequirement| { &m.provider_id }, + |m: &mut AuthRequirement| { &mut m.provider_id }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "audiences", + |m: &AuthRequirement| { &m.audiences }, + |m: &mut AuthRequirement| { &mut m.audiences }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "AuthRequirement", + fields, + oneofs, + ) } } impl ::protobuf::Message for AuthRequirement { + const NAME: &'static str = "AuthRequirement"; + 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.provider_id)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.provider_id = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.audiences)?; + 18 => { + self.audiences = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1549,7 +1178,7 @@ impl ::protobuf::Message for AuthRequirement { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.provider_id.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.provider_id); @@ -1557,98 +1186,65 @@ impl ::protobuf::Message for AuthRequirement { if !self.audiences.is_empty() { my_size += ::protobuf::rt::string_size(2, &self.audiences); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.provider_id.is_empty() { os.write_string(1, &self.provider_id)?; } if !self.audiences.is_empty() { os.write_string(2, &self.audiences)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> AuthRequirement { AuthRequirement::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "provider_id", - |m: &AuthRequirement| { &m.provider_id }, - |m: &mut AuthRequirement| { &mut m.provider_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "audiences", - |m: &AuthRequirement| { &m.audiences }, - |m: &mut AuthRequirement| { &mut m.audiences }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "AuthRequirement", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.provider_id.clear(); + self.audiences.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static AuthRequirement { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(AuthRequirement::new) + static instance: AuthRequirement = AuthRequirement { + provider_id: ::std::string::String::new(), + audiences: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for AuthRequirement { - fn clear(&mut self) { - self.provider_id.clear(); - self.audiences.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for AuthRequirement { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("AuthRequirement").unwrap()).clone() } } -impl ::std::fmt::Debug for AuthRequirement { +impl ::std::fmt::Display for AuthRequirement { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AuthRequirement { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -1675,7 +1271,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ ncesBk\n\x0ecom.google.apiB\tAuthProtoP\x01ZEgoogle.golang.org/genproto/\ googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIJ\xd3G\n\x07\ \x12\x05\x0e\0\xec\x01\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\ - \x04\x20Copyright\x202023\x20Google\x20LLC\n\n\x20Licensed\x20under\x20t\ + \x04\x20Copyright\x202024\x20Google\x20LLC\n\n\x20Licensed\x20under\x20t\ he\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\ \x20you\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20complian\ ce\x20with\x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20\ @@ -1906,14 +1502,36 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x01\x03\x12\x04\xeb\x01\x15\x16b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(6); + messages.push(Authentication::generated_message_descriptor_data()); + messages.push(AuthenticationRule::generated_message_descriptor_data()); + messages.push(JwtLocation::generated_message_descriptor_data()); + messages.push(AuthProvider::generated_message_descriptor_data()); + messages.push(OAuthRequirements::generated_message_descriptor_data()); + messages.push(AuthRequirement::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/backend.rs b/googleapis-raw/src/api/backend.rs index 7149870..a905487 100644 --- a/googleapis-raw/src/api/backend.rs +++ b/googleapis-raw/src/api/backend.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,28 +9,35 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/backend.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +/// `Backend` defines the backend configuration for a service. +// @@protoc_insertion_point(message:google.api.Backend) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Backend { // message fields - pub rules: ::protobuf::RepeatedField, + /// A list of API backend rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + // @@protoc_insertion_point(field:google.api.Backend.rules) + pub rules: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Backend.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Backend { @@ -43,51 +51,37 @@ impl Backend { ::std::default::Default::default() } - // repeated .google.api.BackendRule rules = 1; - - - pub fn get_rules(&self) -> &[BackendRule] { - &self.rules - } - pub fn clear_rules(&mut self) { - self.rules.clear(); - } - - // Param is passed by value, moved - pub fn set_rules(&mut self, v: ::protobuf::RepeatedField) { - self.rules = v; - } - - // Mutable pointer to the field. - pub fn mut_rules(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.rules - } - - // Take field - pub fn take_rules(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.rules, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "rules", + |m: &Backend| { &m.rules }, + |m: &mut Backend| { &mut m.rules }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Backend", + fields, + oneofs, + ) } } impl ::protobuf::Message for Backend { + const NAME: &'static str = "Backend"; + fn is_initialized(&self) -> bool { - for v in &self.rules { - 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.rules)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.rules.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -96,115 +90,104 @@ impl ::protobuf::Message for Backend { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.rules { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.rules { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Backend { Backend::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rules", - |m: &Backend| { &m.rules }, - |m: &mut Backend| { &mut m.rules }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Backend", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.rules.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Backend { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Backend::new) + static instance: Backend = Backend { + rules: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Backend { - fn clear(&mut self) { - self.rules.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Backend { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Backend").unwrap()).clone() } } -impl ::std::fmt::Debug for Backend { +impl ::std::fmt::Display for Backend { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Backend { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// A backend rule provides configuration for an individual API element. +// @@protoc_insertion_point(message:google.api.BackendRule) +#[derive(PartialEq,Clone,Default,Debug)] pub struct BackendRule { // message fields + /// Selects the methods to which this rule applies. + /// + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax + /// details. + // @@protoc_insertion_point(field:google.api.BackendRule.selector) pub selector: ::std::string::String, + // @@protoc_insertion_point(field:google.api.BackendRule.address) pub address: ::std::string::String, + /// The number of seconds to wait for a response from a request. The default + /// varies based on the request protocol and deployment environment. + // @@protoc_insertion_point(field:google.api.BackendRule.deadline) pub deadline: f64, + /// Deprecated, do not use. + // @@protoc_insertion_point(field:google.api.BackendRule.min_deadline) pub min_deadline: f64, + /// The number of seconds to wait for the completion of a long running + /// operation. The default is no deadline. + // @@protoc_insertion_point(field:google.api.BackendRule.operation_deadline) pub operation_deadline: f64, - pub path_translation: BackendRule_PathTranslation, + // @@protoc_insertion_point(field:google.api.BackendRule.path_translation) + pub path_translation: ::protobuf::EnumOrUnknown, + // @@protoc_insertion_point(field:google.api.BackendRule.protocol) pub protocol: ::std::string::String, + /// The map between request protocol and the backend address. + // @@protoc_insertion_point(field:google.api.BackendRule.overrides_by_request_protocol) pub overrides_by_request_protocol: ::std::collections::HashMap<::std::string::String, BackendRule>, // message oneof groups - pub authentication: ::std::option::Option, + pub authentication: ::std::option::Option, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.BackendRule.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a BackendRule { @@ -213,162 +196,44 @@ impl<'a> ::std::default::Default for &'a BackendRule { } } -#[derive(Clone,PartialEq,Debug)] -pub enum BackendRule_oneof_authentication { - jwt_audience(::std::string::String), - disable_auth(bool), -} - impl BackendRule { pub fn new() -> BackendRule { ::std::default::Default::default() } - // string selector = 1; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - - // string address = 2; - - - pub fn get_address(&self) -> &str { - &self.address - } - pub fn clear_address(&mut self) { - self.address.clear(); - } - - // Param is passed by value, moved - pub fn set_address(&mut self, v: ::std::string::String) { - self.address = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_address(&mut self) -> &mut ::std::string::String { - &mut self.address - } - - // Take field - pub fn take_address(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.address, ::std::string::String::new()) - } - - // double deadline = 3; - - - pub fn get_deadline(&self) -> f64 { - self.deadline - } - pub fn clear_deadline(&mut self) { - self.deadline = 0.; - } - - // Param is passed by value, moved - pub fn set_deadline(&mut self, v: f64) { - self.deadline = v; - } - - // double min_deadline = 4; - - - pub fn get_min_deadline(&self) -> f64 { - self.min_deadline - } - pub fn clear_min_deadline(&mut self) { - self.min_deadline = 0.; - } - - // Param is passed by value, moved - pub fn set_min_deadline(&mut self, v: f64) { - self.min_deadline = v; - } - - // double operation_deadline = 5; - - - pub fn get_operation_deadline(&self) -> f64 { - self.operation_deadline - } - pub fn clear_operation_deadline(&mut self) { - self.operation_deadline = 0.; - } - - // Param is passed by value, moved - pub fn set_operation_deadline(&mut self, v: f64) { - self.operation_deadline = v; - } - - // .google.api.BackendRule.PathTranslation path_translation = 6; - - - pub fn get_path_translation(&self) -> BackendRule_PathTranslation { - self.path_translation - } - pub fn clear_path_translation(&mut self) { - self.path_translation = BackendRule_PathTranslation::PATH_TRANSLATION_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_path_translation(&mut self, v: BackendRule_PathTranslation) { - self.path_translation = v; - } - // string jwt_audience = 7; - - pub fn get_jwt_audience(&self) -> &str { + pub fn jwt_audience(&self) -> &str { match self.authentication { - ::std::option::Option::Some(BackendRule_oneof_authentication::jwt_audience(ref v)) => v, + ::std::option::Option::Some(backend_rule::Authentication::JwtAudience(ref v)) => v, _ => "", } } + pub fn clear_jwt_audience(&mut self) { self.authentication = ::std::option::Option::None; } pub fn has_jwt_audience(&self) -> bool { match self.authentication { - ::std::option::Option::Some(BackendRule_oneof_authentication::jwt_audience(..)) => true, + ::std::option::Option::Some(backend_rule::Authentication::JwtAudience(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_jwt_audience(&mut self, v: ::std::string::String) { - self.authentication = ::std::option::Option::Some(BackendRule_oneof_authentication::jwt_audience(v)) + self.authentication = ::std::option::Option::Some(backend_rule::Authentication::JwtAudience(v)) } // Mutable pointer to the field. pub fn mut_jwt_audience(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(BackendRule_oneof_authentication::jwt_audience(_)) = self.authentication { + if let ::std::option::Option::Some(backend_rule::Authentication::JwtAudience(_)) = self.authentication { } else { - self.authentication = ::std::option::Option::Some(BackendRule_oneof_authentication::jwt_audience(::std::string::String::new())); + self.authentication = ::std::option::Option::Some(backend_rule::Authentication::JwtAudience(::std::string::String::new())); } match self.authentication { - ::std::option::Option::Some(BackendRule_oneof_authentication::jwt_audience(ref mut v)) => v, + ::std::option::Option::Some(backend_rule::Authentication::JwtAudience(ref mut v)) => v, _ => panic!(), } } @@ -377,7 +242,7 @@ impl BackendRule { pub fn take_jwt_audience(&mut self) -> ::std::string::String { if self.has_jwt_audience() { match self.authentication.take() { - ::std::option::Option::Some(BackendRule_oneof_authentication::jwt_audience(v)) => v, + ::std::option::Option::Some(backend_rule::Authentication::JwtAudience(v)) => v, _ => panic!(), } } else { @@ -387,140 +252,147 @@ impl BackendRule { // bool disable_auth = 8; - - pub fn get_disable_auth(&self) -> bool { + pub fn disable_auth(&self) -> bool { match self.authentication { - ::std::option::Option::Some(BackendRule_oneof_authentication::disable_auth(v)) => v, + ::std::option::Option::Some(backend_rule::Authentication::DisableAuth(v)) => v, _ => false, } } + pub fn clear_disable_auth(&mut self) { self.authentication = ::std::option::Option::None; } pub fn has_disable_auth(&self) -> bool { match self.authentication { - ::std::option::Option::Some(BackendRule_oneof_authentication::disable_auth(..)) => true, + ::std::option::Option::Some(backend_rule::Authentication::DisableAuth(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_disable_auth(&mut self, v: bool) { - self.authentication = ::std::option::Option::Some(BackendRule_oneof_authentication::disable_auth(v)) - } - - // string protocol = 9; - - - pub fn get_protocol(&self) -> &str { - &self.protocol - } - pub fn clear_protocol(&mut self) { - self.protocol.clear(); - } - - // Param is passed by value, moved - pub fn set_protocol(&mut self, v: ::std::string::String) { - self.protocol = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_protocol(&mut self) -> &mut ::std::string::String { - &mut self.protocol - } - - // Take field - pub fn take_protocol(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.protocol, ::std::string::String::new()) - } - - // repeated .google.api.BackendRule.OverridesByRequestProtocolEntry overrides_by_request_protocol = 10; - - - pub fn get_overrides_by_request_protocol(&self) -> &::std::collections::HashMap<::std::string::String, BackendRule> { - &self.overrides_by_request_protocol - } - pub fn clear_overrides_by_request_protocol(&mut self) { - self.overrides_by_request_protocol.clear(); - } - - // Param is passed by value, moved - pub fn set_overrides_by_request_protocol(&mut self, v: ::std::collections::HashMap<::std::string::String, BackendRule>) { - self.overrides_by_request_protocol = v; - } - - // Mutable pointer to the field. - pub fn mut_overrides_by_request_protocol(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, BackendRule> { - &mut self.overrides_by_request_protocol - } - - // Take field - pub fn take_overrides_by_request_protocol(&mut self) -> ::std::collections::HashMap<::std::string::String, BackendRule> { - ::std::mem::replace(&mut self.overrides_by_request_protocol, ::std::collections::HashMap::new()) + self.authentication = ::std::option::Option::Some(backend_rule::Authentication::DisableAuth(v)) + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(10); + let mut oneofs = ::std::vec::Vec::with_capacity(1); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &BackendRule| { &m.selector }, + |m: &mut BackendRule| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "address", + |m: &BackendRule| { &m.address }, + |m: &mut BackendRule| { &mut m.address }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "deadline", + |m: &BackendRule| { &m.deadline }, + |m: &mut BackendRule| { &mut m.deadline }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "min_deadline", + |m: &BackendRule| { &m.min_deadline }, + |m: &mut BackendRule| { &mut m.min_deadline }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "operation_deadline", + |m: &BackendRule| { &m.operation_deadline }, + |m: &mut BackendRule| { &mut m.operation_deadline }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "path_translation", + |m: &BackendRule| { &m.path_translation }, + |m: &mut BackendRule| { &mut m.path_translation }, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "jwt_audience", + BackendRule::has_jwt_audience, + BackendRule::jwt_audience, + BackendRule::set_jwt_audience, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>( + "disable_auth", + BackendRule::has_disable_auth, + BackendRule::disable_auth, + BackendRule::set_disable_auth, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "protocol", + |m: &BackendRule| { &m.protocol }, + |m: &mut BackendRule| { &mut m.protocol }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "overrides_by_request_protocol", + |m: &BackendRule| { &m.overrides_by_request_protocol }, + |m: &mut BackendRule| { &mut m.overrides_by_request_protocol }, + )); + oneofs.push(backend_rule::Authentication::generated_oneof_descriptor_data()); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "BackendRule", + fields, + oneofs, + ) } } impl ::protobuf::Message for BackendRule { + const NAME: &'static str = "BackendRule"; + 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.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.selector = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.address)?; + 18 => { + self.address = is.read_string()?; }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.deadline = tmp; + 25 => { + self.deadline = is.read_double()?; }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.min_deadline = tmp; + 33 => { + self.min_deadline = is.read_double()?; }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.operation_deadline = tmp; + 41 => { + self.operation_deadline = is.read_double()?; }, - 6 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.path_translation, 6, &mut self.unknown_fields)? + 48 => { + self.path_translation = is.read_enum_or_unknown()?; }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.authentication = ::std::option::Option::Some(BackendRule_oneof_authentication::jwt_audience(is.read_string()?)); + 58 => { + self.authentication = ::std::option::Option::Some(backend_rule::Authentication::JwtAudience(is.read_string()?)); }, - 8 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.authentication = ::std::option::Option::Some(BackendRule_oneof_authentication::disable_auth(is.read_bool()?)); + 64 => { + self.authentication = ::std::option::Option::Some(backend_rule::Authentication::DisableAuth(is.read_bool()?)); }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.protocol)?; + 74 => { + self.protocol = is.read_string()?; }, - 10 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(wire_type, is, &mut self.overrides_by_request_protocol)?; + 82 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 18 => value = is.read_message()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.overrides_by_request_protocol.insert(key, value); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -529,7 +401,7 @@ impl ::protobuf::Message for BackendRule { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.selector); @@ -538,37 +410,43 @@ impl ::protobuf::Message for BackendRule { my_size += ::protobuf::rt::string_size(2, &self.address); } if self.deadline != 0. { - my_size += 9; + my_size += 1 + 8; } if self.min_deadline != 0. { - my_size += 9; + my_size += 1 + 8; } if self.operation_deadline != 0. { - my_size += 9; + my_size += 1 + 8; } - if self.path_translation != BackendRule_PathTranslation::PATH_TRANSLATION_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(6, self.path_translation); + if self.path_translation != ::protobuf::EnumOrUnknown::new(backend_rule::PathTranslation::PATH_TRANSLATION_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(6, self.path_translation.value()); } if !self.protocol.is_empty() { my_size += ::protobuf::rt::string_size(9, &self.protocol); } - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(10, &self.overrides_by_request_protocol); + for (k, v) in &self.overrides_by_request_protocol { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + let len = v.compute_size(); + entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; if let ::std::option::Option::Some(ref v) = self.authentication { match v { - &BackendRule_oneof_authentication::jwt_audience(ref v) => { + &backend_rule::Authentication::JwtAudience(ref v) => { my_size += ::protobuf::rt::string_size(7, &v); }, - &BackendRule_oneof_authentication::disable_auth(v) => { - my_size += 2; + &backend_rule::Authentication::DisableAuth(v) => { + my_size += 1 + 1; }, }; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(1, &self.selector)?; } @@ -584,203 +462,185 @@ impl ::protobuf::Message for BackendRule { if self.operation_deadline != 0. { os.write_double(5, self.operation_deadline)?; } - if self.path_translation != BackendRule_PathTranslation::PATH_TRANSLATION_UNSPECIFIED { - os.write_enum(6, ::protobuf::ProtobufEnum::value(&self.path_translation))?; + if self.path_translation != ::protobuf::EnumOrUnknown::new(backend_rule::PathTranslation::PATH_TRANSLATION_UNSPECIFIED) { + os.write_enum(6, ::protobuf::EnumOrUnknown::value(&self.path_translation))?; } if !self.protocol.is_empty() { os.write_string(9, &self.protocol)?; } - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(10, &self.overrides_by_request_protocol, os)?; + for (k, v) in &self.overrides_by_request_protocol { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + let len = v.cached_size() as u64; + entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + os.write_raw_varint32(82)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; + }; if let ::std::option::Option::Some(ref v) = self.authentication { match v { - &BackendRule_oneof_authentication::jwt_audience(ref v) => { + &backend_rule::Authentication::JwtAudience(ref v) => { os.write_string(7, v)?; }, - &BackendRule_oneof_authentication::disable_auth(v) => { + &backend_rule::Authentication::DisableAuth(v) => { os.write_bool(8, v)?; }, }; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> BackendRule { BackendRule::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &BackendRule| { &m.selector }, - |m: &mut BackendRule| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "address", - |m: &BackendRule| { &m.address }, - |m: &mut BackendRule| { &mut m.address }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "deadline", - |m: &BackendRule| { &m.deadline }, - |m: &mut BackendRule| { &mut m.deadline }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "min_deadline", - |m: &BackendRule| { &m.min_deadline }, - |m: &mut BackendRule| { &mut m.min_deadline }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "operation_deadline", - |m: &BackendRule| { &m.operation_deadline }, - |m: &mut BackendRule| { &mut m.operation_deadline }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "path_translation", - |m: &BackendRule| { &m.path_translation }, - |m: &mut BackendRule| { &mut m.path_translation }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "jwt_audience", - BackendRule::has_jwt_audience, - BackendRule::get_jwt_audience, - )); - fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>( - "disable_auth", - BackendRule::has_disable_auth, - BackendRule::get_disable_auth, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "protocol", - |m: &BackendRule| { &m.protocol }, - |m: &mut BackendRule| { &mut m.protocol }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>( - "overrides_by_request_protocol", - |m: &BackendRule| { &m.overrides_by_request_protocol }, - |m: &mut BackendRule| { &mut m.overrides_by_request_protocol }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "BackendRule", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static BackendRule { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BackendRule::new) - } -} - -impl ::protobuf::Clear for BackendRule { fn clear(&mut self) { self.selector.clear(); self.address.clear(); self.deadline = 0.; self.min_deadline = 0.; self.operation_deadline = 0.; - self.path_translation = BackendRule_PathTranslation::PATH_TRANSLATION_UNSPECIFIED; + self.path_translation = ::protobuf::EnumOrUnknown::new(backend_rule::PathTranslation::PATH_TRANSLATION_UNSPECIFIED); self.authentication = ::std::option::Option::None; self.authentication = ::std::option::Option::None; self.protocol.clear(); self.overrides_by_request_protocol.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static BackendRule { + static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); + instance.get(BackendRule::new) + } +} + +impl ::protobuf::MessageFull for BackendRule { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("BackendRule").unwrap()).clone() } } -impl ::std::fmt::Debug for BackendRule { +impl ::std::fmt::Display for BackendRule { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for BackendRule { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum BackendRule_PathTranslation { - PATH_TRANSLATION_UNSPECIFIED = 0, - CONSTANT_ADDRESS = 1, - APPEND_PATH_TO_ADDRESS = 2, -} +/// Nested message and enums of message `BackendRule` +pub mod backend_rule { + + #[derive(Clone,PartialEq,Debug)] + #[non_exhaustive] + // @@protoc_insertion_point(oneof:google.api.BackendRule.authentication) + pub enum Authentication { + // @@protoc_insertion_point(oneof_field:google.api.BackendRule.jwt_audience) + JwtAudience(::std::string::String), + // @@protoc_insertion_point(oneof_field:google.api.BackendRule.disable_auth) + DisableAuth(bool), + } -impl ::protobuf::ProtobufEnum for BackendRule_PathTranslation { - fn value(&self) -> i32 { - *self as i32 + impl ::protobuf::Oneof for Authentication { } - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(BackendRule_PathTranslation::PATH_TRANSLATION_UNSPECIFIED), - 1 => ::std::option::Option::Some(BackendRule_PathTranslation::CONSTANT_ADDRESS), - 2 => ::std::option::Option::Some(BackendRule_PathTranslation::APPEND_PATH_TO_ADDRESS), - _ => ::std::option::Option::None + impl ::protobuf::OneofFull for Authentication { + fn descriptor() -> ::protobuf::reflect::OneofDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| ::descriptor().oneof_by_name("authentication").unwrap()).clone() } } - fn values() -> &'static [Self] { - static values: &'static [BackendRule_PathTranslation] = &[ - BackendRule_PathTranslation::PATH_TRANSLATION_UNSPECIFIED, - BackendRule_PathTranslation::CONSTANT_ADDRESS, - BackendRule_PathTranslation::APPEND_PATH_TO_ADDRESS, - ]; - values + impl Authentication { + pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { + ::protobuf::reflect::GeneratedOneofDescriptorData::new::("authentication") + } } + /// Path Translation specifies how to combine the backend address with the + /// request path in order to produce the appropriate forwarding URL for the + /// request. + /// + /// Path Translation is applicable only to HTTP-based backends. Backends which + /// do not accept requests over HTTP/HTTPS should leave `path_translation` + /// unspecified. + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.BackendRule.PathTranslation) + pub enum PathTranslation { + // @@protoc_insertion_point(enum_value:google.api.BackendRule.PathTranslation.PATH_TRANSLATION_UNSPECIFIED) + PATH_TRANSLATION_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.BackendRule.PathTranslation.CONSTANT_ADDRESS) + CONSTANT_ADDRESS = 1, + // @@protoc_insertion_point(enum_value:google.api.BackendRule.PathTranslation.APPEND_PATH_TO_ADDRESS) + APPEND_PATH_TO_ADDRESS = 2, + } + + impl ::protobuf::Enum for PathTranslation { + const NAME: &'static str = "PathTranslation"; + + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(PathTranslation::PATH_TRANSLATION_UNSPECIFIED), + 1 => ::std::option::Option::Some(PathTranslation::CONSTANT_ADDRESS), + 2 => ::std::option::Option::Some(PathTranslation::APPEND_PATH_TO_ADDRESS), + _ => ::std::option::Option::None + } + } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("BackendRule.PathTranslation", file_descriptor_proto()) - }) + fn from_str(str: &str) -> ::std::option::Option { + match str { + "PATH_TRANSLATION_UNSPECIFIED" => ::std::option::Option::Some(PathTranslation::PATH_TRANSLATION_UNSPECIFIED), + "CONSTANT_ADDRESS" => ::std::option::Option::Some(PathTranslation::CONSTANT_ADDRESS), + "APPEND_PATH_TO_ADDRESS" => ::std::option::Option::Some(PathTranslation::APPEND_PATH_TO_ADDRESS), + _ => ::std::option::Option::None + } + } + + const VALUES: &'static [PathTranslation] = &[ + PathTranslation::PATH_TRANSLATION_UNSPECIFIED, + PathTranslation::CONSTANT_ADDRESS, + PathTranslation::APPEND_PATH_TO_ADDRESS, + ]; } -} -impl ::std::marker::Copy for BackendRule_PathTranslation { -} + impl ::protobuf::EnumFull for PathTranslation { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("BackendRule.PathTranslation").unwrap()).clone() + } -impl ::std::default::Default for BackendRule_PathTranslation { - fn default() -> Self { - BackendRule_PathTranslation::PATH_TRANSLATION_UNSPECIFIED + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } + } + + impl ::std::default::Default for PathTranslation { + fn default() -> Self { + PathTranslation::PATH_TRANSLATION_UNSPECIFIED + } } -} -impl ::protobuf::reflect::ProtobufValue for BackendRule_PathTranslation { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + impl PathTranslation { + pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("BackendRule.PathTranslation") + } } } @@ -805,7 +665,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ _TO_ADDRESS\x10\x02B\x10\n\x0eauthenticationBn\n\x0ecom.google.apiB\x0cB\ ackendProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfi\ g;serviceconfig\xa2\x02\x04GAPIJ\xec3\n\x07\x12\x05\x0e\0\xb8\x01\x01\n\ - \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Go\ + \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\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\ @@ -978,14 +838,33 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x01;=b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(Backend::generated_message_descriptor_data()); + messages.push(BackendRule::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(backend_rule::PathTranslation::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/billing.rs b/googleapis-raw/src/api/billing.rs index 8033e8a..54441ad 100644 --- a/googleapis-raw/src/api/billing.rs +++ b/googleapis-raw/src/api/billing.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,28 +9,35 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/billing.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Billing) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Billing { // message fields - pub consumer_destinations: ::protobuf::RepeatedField, + /// Billing configurations for sending metrics to the consumer project. + /// There can be multiple consumer destinations per service, each one must have + /// a different monitored resource type. A metric can be used in at most + /// one consumer destination. + // @@protoc_insertion_point(field:google.api.Billing.consumer_destinations) + pub consumer_destinations: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Billing.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Billing { @@ -43,51 +51,37 @@ impl Billing { ::std::default::Default::default() } - // repeated .google.api.Billing.BillingDestination consumer_destinations = 8; - - - pub fn get_consumer_destinations(&self) -> &[Billing_BillingDestination] { - &self.consumer_destinations - } - pub fn clear_consumer_destinations(&mut self) { - self.consumer_destinations.clear(); - } - - // Param is passed by value, moved - pub fn set_consumer_destinations(&mut self, v: ::protobuf::RepeatedField) { - self.consumer_destinations = v; - } - - // Mutable pointer to the field. - pub fn mut_consumer_destinations(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.consumer_destinations - } - - // Take field - pub fn take_consumer_destinations(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.consumer_destinations, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "consumer_destinations", + |m: &Billing| { &m.consumer_destinations }, + |m: &mut Billing| { &mut m.consumer_destinations }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Billing", + fields, + oneofs, + ) } } impl ::protobuf::Message for Billing { + const NAME: &'static str = "Billing"; + fn is_initialized(&self) -> bool { - for v in &self.consumer_destinations { - 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 { - 8 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.consumer_destinations)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 66 => { + self.consumer_destinations.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -96,296 +90,216 @@ impl ::protobuf::Message for Billing { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.consumer_destinations { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.consumer_destinations { - os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Billing { Billing::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "consumer_destinations", - |m: &Billing| { &m.consumer_destinations }, - |m: &mut Billing| { &mut m.consumer_destinations }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Billing", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.consumer_destinations.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Billing { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Billing::new) + static instance: Billing = Billing { + consumer_destinations: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Billing { - fn clear(&mut self) { - self.consumer_destinations.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Billing { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Billing").unwrap()).clone() } } -impl ::std::fmt::Debug for Billing { +impl ::std::fmt::Display for Billing { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Billing { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] -pub struct Billing_BillingDestination { - // message fields - pub monitored_resource: ::std::string::String, - pub metrics: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Billing_BillingDestination { - fn default() -> &'a Billing_BillingDestination { - ::default_instance() - } -} - -impl Billing_BillingDestination { - pub fn new() -> Billing_BillingDestination { - ::std::default::Default::default() - } - - // string monitored_resource = 1; - - - pub fn get_monitored_resource(&self) -> &str { - &self.monitored_resource - } - pub fn clear_monitored_resource(&mut self) { - self.monitored_resource.clear(); - } - - // Param is passed by value, moved - pub fn set_monitored_resource(&mut self, v: ::std::string::String) { - self.monitored_resource = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_monitored_resource(&mut self) -> &mut ::std::string::String { - &mut self.monitored_resource - } - - // Take field - pub fn take_monitored_resource(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.monitored_resource, ::std::string::String::new()) +/// Nested message and enums of message `Billing` +pub mod billing { + /// Configuration of a specific billing destination (Currently only support + /// bill against consumer project). + // @@protoc_insertion_point(message:google.api.Billing.BillingDestination) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct BillingDestination { + // message fields + /// The monitored resource type. The type must be defined in + /// [Service.monitored_resources][google.api.Service.monitored_resources] + /// section. + // @@protoc_insertion_point(field:google.api.Billing.BillingDestination.monitored_resource) + pub monitored_resource: ::std::string::String, + /// Names of the metrics to report to this billing destination. + /// Each name must be defined in + /// [Service.metrics][google.api.Service.metrics] section. + // @@protoc_insertion_point(field:google.api.Billing.BillingDestination.metrics) + pub metrics: ::std::vec::Vec<::std::string::String>, + // special fields + // @@protoc_insertion_point(special_field:google.api.Billing.BillingDestination.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a BillingDestination { + fn default() -> &'a BillingDestination { + ::default_instance() + } } - // repeated string metrics = 2; - - - pub fn get_metrics(&self) -> &[::std::string::String] { - &self.metrics - } - pub fn clear_metrics(&mut self) { - self.metrics.clear(); - } + impl BillingDestination { + pub fn new() -> BillingDestination { + ::std::default::Default::default() + } - // Param is passed by value, moved - pub fn set_metrics(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.metrics = v; + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "monitored_resource", + |m: &BillingDestination| { &m.monitored_resource }, + |m: &mut BillingDestination| { &mut m.monitored_resource }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "metrics", + |m: &BillingDestination| { &m.metrics }, + |m: &mut BillingDestination| { &mut m.metrics }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Billing.BillingDestination", + fields, + oneofs, + ) + } } - // Mutable pointer to the field. - pub fn mut_metrics(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.metrics - } + impl ::protobuf::Message for BillingDestination { + const NAME: &'static str = "BillingDestination"; - // Take field - pub fn take_metrics(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.metrics, ::protobuf::RepeatedField::new()) - } -} + fn is_initialized(&self) -> bool { + true + } -impl ::protobuf::Message for Billing_BillingDestination { - fn is_initialized(&self) -> bool { - true - } + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.monitored_resource = is.read_string()?; + }, + 18 => { + self.metrics.push(is.read_string()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } - 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.monitored_resource)?; - }, - 2 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.metrics)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if !self.monitored_resource.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.monitored_resource); + } + for value in &self.metrics { + my_size += ::protobuf::rt::string_size(2, &value); }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size } - ::std::result::Result::Ok(()) - } - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.monitored_resource.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.monitored_resource); + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.monitored_resource.is_empty() { + os.write_string(1, &self.monitored_resource)?; + } + for v in &self.metrics { + os.write_string(2, &v)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) } - for value in &self.metrics { - 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.monitored_resource.is_empty() { - os.write_string(1, &self.monitored_resource)?; + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - for v in &self.metrics { - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } - fn new() -> Billing_BillingDestination { - Billing_BillingDestination::new() - } + fn new() -> BillingDestination { + BillingDestination::new() + } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "monitored_resource", - |m: &Billing_BillingDestination| { &m.monitored_resource }, - |m: &mut Billing_BillingDestination| { &mut m.monitored_resource }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "metrics", - |m: &Billing_BillingDestination| { &m.metrics }, - |m: &mut Billing_BillingDestination| { &mut m.metrics }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Billing.BillingDestination", - fields, - file_descriptor_proto() - ) - }) - } + fn clear(&mut self) { + self.monitored_resource.clear(); + self.metrics.clear(); + self.special_fields.clear(); + } - fn default_instance() -> &'static Billing_BillingDestination { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Billing_BillingDestination::new) + fn default_instance() -> &'static BillingDestination { + static instance: BillingDestination = BillingDestination { + monitored_resource: ::std::string::String::new(), + metrics: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } } -} -impl ::protobuf::Clear for Billing_BillingDestination { - fn clear(&mut self) { - self.monitored_resource.clear(); - self.metrics.clear(); - self.unknown_fields.clear(); + impl ::protobuf::MessageFull for BillingDestination { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Billing.BillingDestination").unwrap()).clone() + } } -} -impl ::std::fmt::Debug for Billing_BillingDestination { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + impl ::std::fmt::Display for BillingDestination { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } -} -impl ::protobuf::reflect::ProtobufValue for Billing_BillingDestination { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) + impl ::protobuf::reflect::ProtobufValue for BillingDestination { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } } @@ -397,7 +311,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ e\x12\x18\n\x07metrics\x18\x02\x20\x03(\tR\x07metricsBn\n\x0ecom.google.\ apiB\x0cBillingProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/ser\ viceconfig;serviceconfig\xa2\x02\x04GAPIJ\xa8\x16\n\x06\x12\x04\x0e\0L\ - \x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\ + \x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\ \x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\ \x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20us\ e\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20Licens\ @@ -471,14 +385,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x0c\n\x05\x04\0\x02\0\x03\x12\x03K67b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(Billing::generated_message_descriptor_data()); + messages.push(billing::BillingDestination::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/client.rs b/googleapis-raw/src/api/client.rs index 427d842..7741c81 100644 --- a/googleapis-raw/src/api/client.rs +++ b/googleapis-raw/src/api/client.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,29 +9,40 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/client.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +/// Required information for every language. +// @@protoc_insertion_point(message:google.api.CommonLanguageSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct CommonLanguageSettings { // message fields + /// Link to automatically generated reference documentation. Example: + /// https://cloud.google.com/nodejs/docs/reference/asset/latest + // @@protoc_insertion_point(field:google.api.CommonLanguageSettings.reference_docs_uri) pub reference_docs_uri: ::std::string::String, - pub destinations: ::std::vec::Vec, + /// The destination where API teams want this client library to be published. + // @@protoc_insertion_point(field:google.api.CommonLanguageSettings.destinations) + pub destinations: ::std::vec::Vec<::protobuf::EnumOrUnknown>, + /// Configuration for which RPCs should be generated in the GAPIC client. + // @@protoc_insertion_point(field:google.api.CommonLanguageSettings.selective_gapic_generation) + pub selective_gapic_generation: ::protobuf::MessageField, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.CommonLanguageSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CommonLanguageSettings { @@ -44,75 +56,56 @@ impl CommonLanguageSettings { ::std::default::Default::default() } - // string reference_docs_uri = 1; - - - pub fn get_reference_docs_uri(&self) -> &str { - &self.reference_docs_uri - } - pub fn clear_reference_docs_uri(&mut self) { - self.reference_docs_uri.clear(); - } - - // Param is passed by value, moved - pub fn set_reference_docs_uri(&mut self, v: ::std::string::String) { - self.reference_docs_uri = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_reference_docs_uri(&mut self) -> &mut ::std::string::String { - &mut self.reference_docs_uri - } - - // Take field - pub fn take_reference_docs_uri(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.reference_docs_uri, ::std::string::String::new()) - } - - // repeated .google.api.ClientLibraryDestination destinations = 2; - - - pub fn get_destinations(&self) -> &[ClientLibraryDestination] { - &self.destinations - } - pub fn clear_destinations(&mut self) { - self.destinations.clear(); - } - - // Param is passed by value, moved - pub fn set_destinations(&mut self, v: ::std::vec::Vec) { - self.destinations = v; - } - - // Mutable pointer to the field. - pub fn mut_destinations(&mut self) -> &mut ::std::vec::Vec { - &mut self.destinations - } - - // Take field - pub fn take_destinations(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.destinations, ::std::vec::Vec::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "reference_docs_uri", + |m: &CommonLanguageSettings| { &m.reference_docs_uri }, + |m: &mut CommonLanguageSettings| { &mut m.reference_docs_uri }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "destinations", + |m: &CommonLanguageSettings| { &m.destinations }, + |m: &mut CommonLanguageSettings| { &mut m.destinations }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, SelectiveGapicGeneration>( + "selective_gapic_generation", + |m: &CommonLanguageSettings| { &m.selective_gapic_generation }, + |m: &mut CommonLanguageSettings| { &mut m.selective_gapic_generation }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "CommonLanguageSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for CommonLanguageSettings { + const NAME: &'static str = "CommonLanguageSettings"; + 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.reference_docs_uri)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.reference_docs_uri = is.read_string()?; + }, + 16 => { + self.destinations.push(is.read_enum_or_unknown()?); + }, + 18 => { + ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.destinations)? }, - 2 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.destinations, 2, &mut self.unknown_fields)? + 26 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.selective_gapic_generation)?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -121,125 +114,128 @@ impl ::protobuf::Message for CommonLanguageSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.reference_docs_uri.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.reference_docs_uri); } for value in &self.destinations { - my_size += ::protobuf::rt::enum_size(2, *value); + my_size += ::protobuf::rt::int32_size(2, value.value()); }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + if let Some(v) = self.selective_gapic_generation.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.reference_docs_uri.is_empty() { os.write_string(1, &self.reference_docs_uri)?; } for v in &self.destinations { - os.write_enum(2, ::protobuf::ProtobufEnum::value(v))?; + os.write_enum(2, ::protobuf::EnumOrUnknown::value(v))?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + if let Some(v) = self.selective_gapic_generation.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + } + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> CommonLanguageSettings { CommonLanguageSettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "reference_docs_uri", - |m: &CommonLanguageSettings| { &m.reference_docs_uri }, - |m: &mut CommonLanguageSettings| { &mut m.reference_docs_uri }, - )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "destinations", - |m: &CommonLanguageSettings| { &m.destinations }, - |m: &mut CommonLanguageSettings| { &mut m.destinations }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CommonLanguageSettings", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.reference_docs_uri.clear(); + self.destinations.clear(); + self.selective_gapic_generation.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static CommonLanguageSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CommonLanguageSettings::new) + static instance: CommonLanguageSettings = CommonLanguageSettings { + reference_docs_uri: ::std::string::String::new(), + destinations: ::std::vec::Vec::new(), + selective_gapic_generation: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for CommonLanguageSettings { - fn clear(&mut self) { - self.reference_docs_uri.clear(); - self.destinations.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for CommonLanguageSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("CommonLanguageSettings").unwrap()).clone() } } -impl ::std::fmt::Debug for CommonLanguageSettings { +impl ::std::fmt::Display for CommonLanguageSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CommonLanguageSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Details about how and where to publish client libraries. +// @@protoc_insertion_point(message:google.api.ClientLibrarySettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct ClientLibrarySettings { // message fields + /// Version of the API to apply these settings to. This is the full protobuf + /// package for the API, ending in the version element. + /// Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.version) pub version: ::std::string::String, - pub launch_stage: super::launch_stage::LaunchStage, + /// Launch stage of this version of the API. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.launch_stage) + pub launch_stage: ::protobuf::EnumOrUnknown, + /// When using transport=rest, the client request will encode enums as + /// numbers rather than strings. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.rest_numeric_enums) pub rest_numeric_enums: bool, - pub java_settings: ::protobuf::SingularPtrField, - pub cpp_settings: ::protobuf::SingularPtrField, - pub php_settings: ::protobuf::SingularPtrField, - pub python_settings: ::protobuf::SingularPtrField, - pub node_settings: ::protobuf::SingularPtrField, - pub dotnet_settings: ::protobuf::SingularPtrField, - pub ruby_settings: ::protobuf::SingularPtrField, - pub go_settings: ::protobuf::SingularPtrField, + /// Settings for legacy Java features, supported in the Service YAML. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.java_settings) + pub java_settings: ::protobuf::MessageField, + /// Settings for C++ client libraries. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.cpp_settings) + pub cpp_settings: ::protobuf::MessageField, + /// Settings for PHP client libraries. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.php_settings) + pub php_settings: ::protobuf::MessageField, + /// Settings for Python client libraries. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.python_settings) + pub python_settings: ::protobuf::MessageField, + /// Settings for Node client libraries. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.node_settings) + pub node_settings: ::protobuf::MessageField, + /// Settings for .NET client libraries. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.dotnet_settings) + pub dotnet_settings: ::protobuf::MessageField, + /// Settings for Ruby client libraries. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.ruby_settings) + pub ruby_settings: ::protobuf::MessageField, + /// Settings for Go client libraries. + // @@protoc_insertion_point(field:google.api.ClientLibrarySettings.go_settings) + pub go_settings: ::protobuf::MessageField, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.ClientLibrarySettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ClientLibrarySettings { @@ -253,984 +249,452 @@ impl ClientLibrarySettings { ::std::default::Default::default() } - // string version = 1; - - - pub fn get_version(&self) -> &str { - &self.version - } - pub fn clear_version(&mut self) { - self.version.clear(); - } - - // Param is passed by value, moved - pub fn set_version(&mut self, v: ::std::string::String) { - self.version = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_version(&mut self) -> &mut ::std::string::String { - &mut self.version - } - - // Take field - pub fn take_version(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.version, ::std::string::String::new()) - } - - // .google.api.LaunchStage launch_stage = 2; - - - pub fn get_launch_stage(&self) -> super::launch_stage::LaunchStage { - self.launch_stage - } - pub fn clear_launch_stage(&mut self) { - self.launch_stage = super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_launch_stage(&mut self, v: super::launch_stage::LaunchStage) { - self.launch_stage = v; - } - - // bool rest_numeric_enums = 3; - - - pub fn get_rest_numeric_enums(&self) -> bool { - self.rest_numeric_enums - } - pub fn clear_rest_numeric_enums(&mut self) { - self.rest_numeric_enums = false; - } - - // Param is passed by value, moved - pub fn set_rest_numeric_enums(&mut self, v: bool) { - self.rest_numeric_enums = v; - } - - // .google.api.JavaSettings java_settings = 21; - - - pub fn get_java_settings(&self) -> &JavaSettings { - self.java_settings.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_java_settings(&mut self) { - self.java_settings.clear(); - } - - pub fn has_java_settings(&self) -> bool { - self.java_settings.is_some() - } - - // Param is passed by value, moved - pub fn set_java_settings(&mut self, v: JavaSettings) { - self.java_settings = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_java_settings(&mut self) -> &mut JavaSettings { - if self.java_settings.is_none() { - self.java_settings.set_default(); - } - self.java_settings.as_mut().unwrap() - } - - // Take field - pub fn take_java_settings(&mut self) -> JavaSettings { - self.java_settings.take().unwrap_or_else(|| JavaSettings::new()) - } - - // .google.api.CppSettings cpp_settings = 22; - - - pub fn get_cpp_settings(&self) -> &CppSettings { - self.cpp_settings.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_cpp_settings(&mut self) { - self.cpp_settings.clear(); - } - - pub fn has_cpp_settings(&self) -> bool { - self.cpp_settings.is_some() - } - - // Param is passed by value, moved - pub fn set_cpp_settings(&mut self, v: CppSettings) { - self.cpp_settings = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cpp_settings(&mut self) -> &mut CppSettings { - if self.cpp_settings.is_none() { - self.cpp_settings.set_default(); - } - self.cpp_settings.as_mut().unwrap() - } - - // Take field - pub fn take_cpp_settings(&mut self) -> CppSettings { - self.cpp_settings.take().unwrap_or_else(|| CppSettings::new()) - } - - // .google.api.PhpSettings php_settings = 23; - - - pub fn get_php_settings(&self) -> &PhpSettings { - self.php_settings.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_php_settings(&mut self) { - self.php_settings.clear(); - } - - pub fn has_php_settings(&self) -> bool { - self.php_settings.is_some() - } - - // Param is passed by value, moved - pub fn set_php_settings(&mut self, v: PhpSettings) { - self.php_settings = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_php_settings(&mut self) -> &mut PhpSettings { - if self.php_settings.is_none() { - self.php_settings.set_default(); - } - self.php_settings.as_mut().unwrap() - } - - // Take field - pub fn take_php_settings(&mut self) -> PhpSettings { - self.php_settings.take().unwrap_or_else(|| PhpSettings::new()) - } - - // .google.api.PythonSettings python_settings = 24; - - - pub fn get_python_settings(&self) -> &PythonSettings { - self.python_settings.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_python_settings(&mut self) { - self.python_settings.clear(); - } - - pub fn has_python_settings(&self) -> bool { - self.python_settings.is_some() - } - - // Param is passed by value, moved - pub fn set_python_settings(&mut self, v: PythonSettings) { - self.python_settings = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_python_settings(&mut self) -> &mut PythonSettings { - if self.python_settings.is_none() { - self.python_settings.set_default(); - } - self.python_settings.as_mut().unwrap() - } - - // Take field - pub fn take_python_settings(&mut self) -> PythonSettings { - self.python_settings.take().unwrap_or_else(|| PythonSettings::new()) - } - - // .google.api.NodeSettings node_settings = 25; - - - pub fn get_node_settings(&self) -> &NodeSettings { - self.node_settings.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_node_settings(&mut self) { - self.node_settings.clear(); - } - - pub fn has_node_settings(&self) -> bool { - self.node_settings.is_some() - } - - // Param is passed by value, moved - pub fn set_node_settings(&mut self, v: NodeSettings) { - self.node_settings = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_node_settings(&mut self) -> &mut NodeSettings { - if self.node_settings.is_none() { - self.node_settings.set_default(); - } - self.node_settings.as_mut().unwrap() - } - - // Take field - pub fn take_node_settings(&mut self) -> NodeSettings { - self.node_settings.take().unwrap_or_else(|| NodeSettings::new()) - } - - // .google.api.DotnetSettings dotnet_settings = 26; - - - pub fn get_dotnet_settings(&self) -> &DotnetSettings { - self.dotnet_settings.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_dotnet_settings(&mut self) { - self.dotnet_settings.clear(); - } - - pub fn has_dotnet_settings(&self) -> bool { - self.dotnet_settings.is_some() - } - - // Param is passed by value, moved - pub fn set_dotnet_settings(&mut self, v: DotnetSettings) { - self.dotnet_settings = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_dotnet_settings(&mut self) -> &mut DotnetSettings { - if self.dotnet_settings.is_none() { - self.dotnet_settings.set_default(); - } - self.dotnet_settings.as_mut().unwrap() - } - - // Take field - pub fn take_dotnet_settings(&mut self) -> DotnetSettings { - self.dotnet_settings.take().unwrap_or_else(|| DotnetSettings::new()) - } - - // .google.api.RubySettings ruby_settings = 27; - - - pub fn get_ruby_settings(&self) -> &RubySettings { - self.ruby_settings.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_ruby_settings(&mut self) { - self.ruby_settings.clear(); - } - - pub fn has_ruby_settings(&self) -> bool { - self.ruby_settings.is_some() - } - - // Param is passed by value, moved - pub fn set_ruby_settings(&mut self, v: RubySettings) { - self.ruby_settings = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ruby_settings(&mut self) -> &mut RubySettings { - if self.ruby_settings.is_none() { - self.ruby_settings.set_default(); - } - self.ruby_settings.as_mut().unwrap() - } - - // Take field - pub fn take_ruby_settings(&mut self) -> RubySettings { - self.ruby_settings.take().unwrap_or_else(|| RubySettings::new()) - } - - // .google.api.GoSettings go_settings = 28; - - - pub fn get_go_settings(&self) -> &GoSettings { - self.go_settings.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_go_settings(&mut self) { - self.go_settings.clear(); - } - - pub fn has_go_settings(&self) -> bool { - self.go_settings.is_some() - } - - // Param is passed by value, moved - pub fn set_go_settings(&mut self, v: GoSettings) { - self.go_settings = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_go_settings(&mut self) -> &mut GoSettings { - if self.go_settings.is_none() { - self.go_settings.set_default(); - } - self.go_settings.as_mut().unwrap() - } - - // Take field - pub fn take_go_settings(&mut self) -> GoSettings { - self.go_settings.take().unwrap_or_else(|| GoSettings::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(11); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "version", + |m: &ClientLibrarySettings| { &m.version }, + |m: &mut ClientLibrarySettings| { &mut m.version }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "launch_stage", + |m: &ClientLibrarySettings| { &m.launch_stage }, + |m: &mut ClientLibrarySettings| { &mut m.launch_stage }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "rest_numeric_enums", + |m: &ClientLibrarySettings| { &m.rest_numeric_enums }, + |m: &mut ClientLibrarySettings| { &mut m.rest_numeric_enums }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, JavaSettings>( + "java_settings", + |m: &ClientLibrarySettings| { &m.java_settings }, + |m: &mut ClientLibrarySettings| { &mut m.java_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CppSettings>( + "cpp_settings", + |m: &ClientLibrarySettings| { &m.cpp_settings }, + |m: &mut ClientLibrarySettings| { &mut m.cpp_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, PhpSettings>( + "php_settings", + |m: &ClientLibrarySettings| { &m.php_settings }, + |m: &mut ClientLibrarySettings| { &mut m.php_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, PythonSettings>( + "python_settings", + |m: &ClientLibrarySettings| { &m.python_settings }, + |m: &mut ClientLibrarySettings| { &mut m.python_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, NodeSettings>( + "node_settings", + |m: &ClientLibrarySettings| { &m.node_settings }, + |m: &mut ClientLibrarySettings| { &mut m.node_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, DotnetSettings>( + "dotnet_settings", + |m: &ClientLibrarySettings| { &m.dotnet_settings }, + |m: &mut ClientLibrarySettings| { &mut m.dotnet_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, RubySettings>( + "ruby_settings", + |m: &ClientLibrarySettings| { &m.ruby_settings }, + |m: &mut ClientLibrarySettings| { &mut m.ruby_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, GoSettings>( + "go_settings", + |m: &ClientLibrarySettings| { &m.go_settings }, + |m: &mut ClientLibrarySettings| { &mut m.go_settings }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ClientLibrarySettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for ClientLibrarySettings { + const NAME: &'static str = "ClientLibrarySettings"; + fn is_initialized(&self) -> bool { - for v in &self.java_settings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.cpp_settings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.php_settings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.python_settings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.node_settings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.dotnet_settings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.ruby_settings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.go_settings { - 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.version)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.version = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.launch_stage, 2, &mut self.unknown_fields)? + 16 => { + self.launch_stage = is.read_enum_or_unknown()?; }, - 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.rest_numeric_enums = tmp; + 24 => { + self.rest_numeric_enums = is.read_bool()?; }, - 21 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.java_settings)?; + 170 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.java_settings)?; }, - 22 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cpp_settings)?; + 178 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.cpp_settings)?; }, - 23 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.php_settings)?; + 186 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.php_settings)?; }, - 24 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.python_settings)?; + 194 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.python_settings)?; }, - 25 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.node_settings)?; + 202 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.node_settings)?; }, - 26 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.dotnet_settings)?; + 210 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.dotnet_settings)?; }, - 27 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ruby_settings)?; + 218 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.ruby_settings)?; }, - 28 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.go_settings)?; + 226 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.go_settings)?; }, - _ => { - ::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.version.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.version); - } - if self.launch_stage != super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(2, self.launch_stage); - } - if self.rest_numeric_enums != false { - my_size += 2; - } - if let Some(ref v) = self.java_settings.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.cpp_settings.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.php_settings.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.python_settings.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.node_settings.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.dotnet_settings.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.ruby_settings.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.go_settings.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::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.version.is_empty() { - os.write_string(1, &self.version)?; - } - if self.launch_stage != super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED { - os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.launch_stage))?; - } - if self.rest_numeric_enums != false { - os.write_bool(3, self.rest_numeric_enums)?; - } - if let Some(ref v) = self.java_settings.as_ref() { - os.write_tag(21, ::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.cpp_settings.as_ref() { - os.write_tag(22, ::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.php_settings.as_ref() { - os.write_tag(23, ::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.python_settings.as_ref() { - os.write_tag(24, ::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.node_settings.as_ref() { - os.write_tag(25, ::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.dotnet_settings.as_ref() { - os.write_tag(26, ::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.ruby_settings.as_ref() { - os.write_tag(27, ::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.go_settings.as_ref() { - os.write_tag(28, ::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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ClientLibrarySettings { - ClientLibrarySettings::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "version", - |m: &ClientLibrarySettings| { &m.version }, - |m: &mut ClientLibrarySettings| { &mut m.version }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "launch_stage", - |m: &ClientLibrarySettings| { &m.launch_stage }, - |m: &mut ClientLibrarySettings| { &mut m.launch_stage }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "rest_numeric_enums", - |m: &ClientLibrarySettings| { &m.rest_numeric_enums }, - |m: &mut ClientLibrarySettings| { &mut m.rest_numeric_enums }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "java_settings", - |m: &ClientLibrarySettings| { &m.java_settings }, - |m: &mut ClientLibrarySettings| { &mut m.java_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "cpp_settings", - |m: &ClientLibrarySettings| { &m.cpp_settings }, - |m: &mut ClientLibrarySettings| { &mut m.cpp_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "php_settings", - |m: &ClientLibrarySettings| { &m.php_settings }, - |m: &mut ClientLibrarySettings| { &mut m.php_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "python_settings", - |m: &ClientLibrarySettings| { &m.python_settings }, - |m: &mut ClientLibrarySettings| { &mut m.python_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "node_settings", - |m: &ClientLibrarySettings| { &m.node_settings }, - |m: &mut ClientLibrarySettings| { &mut m.node_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "dotnet_settings", - |m: &ClientLibrarySettings| { &m.dotnet_settings }, - |m: &mut ClientLibrarySettings| { &mut m.dotnet_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "ruby_settings", - |m: &ClientLibrarySettings| { &m.ruby_settings }, - |m: &mut ClientLibrarySettings| { &mut m.ruby_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "go_settings", - |m: &ClientLibrarySettings| { &m.go_settings }, - |m: &mut ClientLibrarySettings| { &mut m.go_settings }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ClientLibrarySettings", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static ClientLibrarySettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ClientLibrarySettings::new) - } -} - -impl ::protobuf::Clear for ClientLibrarySettings { - fn clear(&mut self) { - self.version.clear(); - self.launch_stage = super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED; - self.rest_numeric_enums = false; - self.java_settings.clear(); - self.cpp_settings.clear(); - self.php_settings.clear(); - self.python_settings.clear(); - self.node_settings.clear(); - self.dotnet_settings.clear(); - self.ruby_settings.clear(); - self.go_settings.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ClientLibrarySettings { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ClientLibrarySettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct Publishing { - // message fields - pub method_settings: ::protobuf::RepeatedField, - pub new_issue_uri: ::std::string::String, - pub documentation_uri: ::std::string::String, - pub api_short_name: ::std::string::String, - pub github_label: ::std::string::String, - pub codeowner_github_teams: ::protobuf::RepeatedField<::std::string::String>, - pub doc_tag_prefix: ::std::string::String, - pub organization: ClientLibraryOrganization, - pub library_settings: ::protobuf::RepeatedField, - pub proto_reference_documentation_uri: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Publishing { - fn default() -> &'a Publishing { - ::default_instance() - } -} - -impl Publishing { - pub fn new() -> Publishing { - ::std::default::Default::default() - } - - // repeated .google.api.MethodSettings method_settings = 2; - - - pub fn get_method_settings(&self) -> &[MethodSettings] { - &self.method_settings - } - pub fn clear_method_settings(&mut self) { - self.method_settings.clear(); - } - - // Param is passed by value, moved - pub fn set_method_settings(&mut self, v: ::protobuf::RepeatedField) { - self.method_settings = v; - } - - // Mutable pointer to the field. - pub fn mut_method_settings(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.method_settings - } - - // Take field - pub fn take_method_settings(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.method_settings, ::protobuf::RepeatedField::new()) - } - - // string new_issue_uri = 101; - - - pub fn get_new_issue_uri(&self) -> &str { - &self.new_issue_uri - } - pub fn clear_new_issue_uri(&mut self) { - self.new_issue_uri.clear(); - } - - // Param is passed by value, moved - pub fn set_new_issue_uri(&mut self, v: ::std::string::String) { - self.new_issue_uri = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_new_issue_uri(&mut self) -> &mut ::std::string::String { - &mut self.new_issue_uri - } - - // Take field - pub fn take_new_issue_uri(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.new_issue_uri, ::std::string::String::new()) - } - - // string documentation_uri = 102; - - - pub fn get_documentation_uri(&self) -> &str { - &self.documentation_uri - } - pub fn clear_documentation_uri(&mut self) { - self.documentation_uri.clear(); - } - - // Param is passed by value, moved - pub fn set_documentation_uri(&mut self, v: ::std::string::String) { - self.documentation_uri = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_documentation_uri(&mut self) -> &mut ::std::string::String { - &mut self.documentation_uri - } - - // Take field - pub fn take_documentation_uri(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.documentation_uri, ::std::string::String::new()) - } - - // string api_short_name = 103; - - - pub fn get_api_short_name(&self) -> &str { - &self.api_short_name - } - pub fn clear_api_short_name(&mut self) { - self.api_short_name.clear(); - } - - // Param is passed by value, moved - pub fn set_api_short_name(&mut self, v: ::std::string::String) { - self.api_short_name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_api_short_name(&mut self) -> &mut ::std::string::String { - &mut self.api_short_name - } - - // Take field - pub fn take_api_short_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.api_short_name, ::std::string::String::new()) - } - - // string github_label = 104; - - - pub fn get_github_label(&self) -> &str { - &self.github_label - } - pub fn clear_github_label(&mut self) { - self.github_label.clear(); - } - - // Param is passed by value, moved - pub fn set_github_label(&mut self, v: ::std::string::String) { - self.github_label = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_github_label(&mut self) -> &mut ::std::string::String { - &mut self.github_label - } - - // Take field - pub fn take_github_label(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.github_label, ::std::string::String::new()) - } - - // repeated string codeowner_github_teams = 105; - - - pub fn get_codeowner_github_teams(&self) -> &[::std::string::String] { - &self.codeowner_github_teams - } - pub fn clear_codeowner_github_teams(&mut self) { - self.codeowner_github_teams.clear(); - } - - // Param is passed by value, moved - pub fn set_codeowner_github_teams(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.codeowner_github_teams = v; - } - - // Mutable pointer to the field. - pub fn mut_codeowner_github_teams(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.codeowner_github_teams - } - - // Take field - pub fn take_codeowner_github_teams(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.codeowner_github_teams, ::protobuf::RepeatedField::new()) - } - - // string doc_tag_prefix = 106; - - - pub fn get_doc_tag_prefix(&self) -> &str { - &self.doc_tag_prefix - } - pub fn clear_doc_tag_prefix(&mut self) { - self.doc_tag_prefix.clear(); + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) } - // Param is passed by value, moved - pub fn set_doc_tag_prefix(&mut self, v: ::std::string::String) { - self.doc_tag_prefix = v; + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if !self.version.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.version); + } + if self.launch_stage != ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(2, self.launch_stage.value()); + } + if self.rest_numeric_enums != false { + my_size += 1 + 1; + } + if let Some(v) = self.java_settings.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.cpp_settings.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.php_settings.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.python_settings.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.node_settings.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.dotnet_settings.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.ruby_settings.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.go_settings.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size } - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_doc_tag_prefix(&mut self) -> &mut ::std::string::String { - &mut self.doc_tag_prefix + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.version.is_empty() { + os.write_string(1, &self.version)?; + } + if self.launch_stage != ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED) { + os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.launch_stage))?; + } + if self.rest_numeric_enums != false { + os.write_bool(3, self.rest_numeric_enums)?; + } + if let Some(v) = self.java_settings.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(21, v, os)?; + } + if let Some(v) = self.cpp_settings.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(22, v, os)?; + } + if let Some(v) = self.php_settings.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(23, v, os)?; + } + if let Some(v) = self.python_settings.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(24, v, os)?; + } + if let Some(v) = self.node_settings.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(25, v, os)?; + } + if let Some(v) = self.dotnet_settings.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(26, v, os)?; + } + if let Some(v) = self.ruby_settings.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(27, v, os)?; + } + if let Some(v) = self.go_settings.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(28, v, os)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) } - // Take field - pub fn take_doc_tag_prefix(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.doc_tag_prefix, ::std::string::String::new()) + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - // .google.api.ClientLibraryOrganization organization = 107; - - - pub fn get_organization(&self) -> ClientLibraryOrganization { - self.organization - } - pub fn clear_organization(&mut self) { - self.organization = ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED; + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } - // Param is passed by value, moved - pub fn set_organization(&mut self, v: ClientLibraryOrganization) { - self.organization = v; + fn new() -> ClientLibrarySettings { + ClientLibrarySettings::new() } - // repeated .google.api.ClientLibrarySettings library_settings = 109; - - - pub fn get_library_settings(&self) -> &[ClientLibrarySettings] { - &self.library_settings - } - pub fn clear_library_settings(&mut self) { - self.library_settings.clear(); + fn clear(&mut self) { + self.version.clear(); + self.launch_stage = ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED); + self.rest_numeric_enums = false; + self.java_settings.clear(); + self.cpp_settings.clear(); + self.php_settings.clear(); + self.python_settings.clear(); + self.node_settings.clear(); + self.dotnet_settings.clear(); + self.ruby_settings.clear(); + self.go_settings.clear(); + self.special_fields.clear(); } - // Param is passed by value, moved - pub fn set_library_settings(&mut self, v: ::protobuf::RepeatedField) { - self.library_settings = v; + fn default_instance() -> &'static ClientLibrarySettings { + static instance: ClientLibrarySettings = ClientLibrarySettings { + version: ::std::string::String::new(), + launch_stage: ::protobuf::EnumOrUnknown::from_i32(0), + rest_numeric_enums: false, + java_settings: ::protobuf::MessageField::none(), + cpp_settings: ::protobuf::MessageField::none(), + php_settings: ::protobuf::MessageField::none(), + python_settings: ::protobuf::MessageField::none(), + node_settings: ::protobuf::MessageField::none(), + dotnet_settings: ::protobuf::MessageField::none(), + ruby_settings: ::protobuf::MessageField::none(), + go_settings: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } +} - // Mutable pointer to the field. - pub fn mut_library_settings(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.library_settings +impl ::protobuf::MessageFull for ClientLibrarySettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ClientLibrarySettings").unwrap()).clone() } +} - // Take field - pub fn take_library_settings(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.library_settings, ::protobuf::RepeatedField::new()) +impl ::std::fmt::Display for ClientLibrarySettings { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) } +} - // string proto_reference_documentation_uri = 110; - +impl ::protobuf::reflect::ProtobufValue for ClientLibrarySettings { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} - pub fn get_proto_reference_documentation_uri(&self) -> &str { - &self.proto_reference_documentation_uri - } - pub fn clear_proto_reference_documentation_uri(&mut self) { - self.proto_reference_documentation_uri.clear(); - } +/// This message configures the settings for publishing [Google Cloud Client +/// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) +/// generated from the service config. +// @@protoc_insertion_point(message:google.api.Publishing) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Publishing { + // message fields + /// A list of API method settings, e.g. the behavior for methods that use the + /// long-running operation pattern. + // @@protoc_insertion_point(field:google.api.Publishing.method_settings) + pub method_settings: ::std::vec::Vec, + /// Link to a *public* URI where users can report issues. Example: + /// https://issuetracker.google.com/issues/new?component=190865&template=1161103 + // @@protoc_insertion_point(field:google.api.Publishing.new_issue_uri) + pub new_issue_uri: ::std::string::String, + /// Link to product home page. Example: + /// https://cloud.google.com/asset-inventory/docs/overview + // @@protoc_insertion_point(field:google.api.Publishing.documentation_uri) + pub documentation_uri: ::std::string::String, + /// Used as a tracking tag when collecting data about the APIs developer + /// relations artifacts like docs, packages delivered to package managers, + /// etc. Example: "speech". + // @@protoc_insertion_point(field:google.api.Publishing.api_short_name) + pub api_short_name: ::std::string::String, + /// GitHub label to apply to issues and pull requests opened for this API. + // @@protoc_insertion_point(field:google.api.Publishing.github_label) + pub github_label: ::std::string::String, + /// GitHub teams to be added to CODEOWNERS in the directory in GitHub + /// containing source code for the client libraries for this API. + // @@protoc_insertion_point(field:google.api.Publishing.codeowner_github_teams) + pub codeowner_github_teams: ::std::vec::Vec<::std::string::String>, + /// A prefix used in sample code when demarking regions to be included in + /// documentation. + // @@protoc_insertion_point(field:google.api.Publishing.doc_tag_prefix) + pub doc_tag_prefix: ::std::string::String, + /// For whom the client library is being published. + // @@protoc_insertion_point(field:google.api.Publishing.organization) + pub organization: ::protobuf::EnumOrUnknown, + /// Client library settings. If the same version string appears multiple + /// times in this list, then the last one wins. Settings from earlier + /// settings with the same version string are discarded. + // @@protoc_insertion_point(field:google.api.Publishing.library_settings) + pub library_settings: ::std::vec::Vec, + /// Optional link to proto reference documentation. Example: + /// https://cloud.google.com/pubsub/lite/docs/reference/rpc + // @@protoc_insertion_point(field:google.api.Publishing.proto_reference_documentation_uri) + pub proto_reference_documentation_uri: ::std::string::String, + /// Optional link to REST reference documentation. Example: + /// https://cloud.google.com/pubsub/lite/docs/reference/rest + // @@protoc_insertion_point(field:google.api.Publishing.rest_reference_documentation_uri) + pub rest_reference_documentation_uri: ::std::string::String, + // special fields + // @@protoc_insertion_point(special_field:google.api.Publishing.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} - // Param is passed by value, moved - pub fn set_proto_reference_documentation_uri(&mut self, v: ::std::string::String) { - self.proto_reference_documentation_uri = v; +impl<'a> ::std::default::Default for &'a Publishing { + fn default() -> &'a Publishing { + ::default_instance() } +} - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_proto_reference_documentation_uri(&mut self) -> &mut ::std::string::String { - &mut self.proto_reference_documentation_uri +impl Publishing { + pub fn new() -> Publishing { + ::std::default::Default::default() } - // Take field - pub fn take_proto_reference_documentation_uri(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.proto_reference_documentation_uri, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(11); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "method_settings", + |m: &Publishing| { &m.method_settings }, + |m: &mut Publishing| { &mut m.method_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "new_issue_uri", + |m: &Publishing| { &m.new_issue_uri }, + |m: &mut Publishing| { &mut m.new_issue_uri }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "documentation_uri", + |m: &Publishing| { &m.documentation_uri }, + |m: &mut Publishing| { &mut m.documentation_uri }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "api_short_name", + |m: &Publishing| { &m.api_short_name }, + |m: &mut Publishing| { &mut m.api_short_name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "github_label", + |m: &Publishing| { &m.github_label }, + |m: &mut Publishing| { &mut m.github_label }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "codeowner_github_teams", + |m: &Publishing| { &m.codeowner_github_teams }, + |m: &mut Publishing| { &mut m.codeowner_github_teams }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "doc_tag_prefix", + |m: &Publishing| { &m.doc_tag_prefix }, + |m: &mut Publishing| { &mut m.doc_tag_prefix }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "organization", + |m: &Publishing| { &m.organization }, + |m: &mut Publishing| { &mut m.organization }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "library_settings", + |m: &Publishing| { &m.library_settings }, + |m: &mut Publishing| { &mut m.library_settings }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "proto_reference_documentation_uri", + |m: &Publishing| { &m.proto_reference_documentation_uri }, + |m: &mut Publishing| { &mut m.proto_reference_documentation_uri }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "rest_reference_documentation_uri", + |m: &Publishing| { &m.rest_reference_documentation_uri }, + |m: &mut Publishing| { &mut m.rest_reference_documentation_uri }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Publishing", + fields, + oneofs, + ) } } impl ::protobuf::Message for Publishing { + const NAME: &'static str = "Publishing"; + fn is_initialized(&self) -> bool { - for v in &self.method_settings { - if !v.is_initialized() { - return false; - } - }; - for v in &self.library_settings { - 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 { - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.method_settings)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 18 => { + self.method_settings.push(is.read_message()?); + }, + 810 => { + self.new_issue_uri = is.read_string()?; }, - 101 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.new_issue_uri)?; + 818 => { + self.documentation_uri = is.read_string()?; }, - 102 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.documentation_uri)?; + 826 => { + self.api_short_name = is.read_string()?; }, - 103 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.api_short_name)?; + 834 => { + self.github_label = is.read_string()?; }, - 104 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.github_label)?; + 842 => { + self.codeowner_github_teams.push(is.read_string()?); }, - 105 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.codeowner_github_teams)?; + 850 => { + self.doc_tag_prefix = is.read_string()?; }, - 106 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc_tag_prefix)?; + 856 => { + self.organization = is.read_enum_or_unknown()?; }, - 107 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.organization, 107, &mut self.unknown_fields)? + 874 => { + self.library_settings.push(is.read_message()?); }, - 109 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.library_settings)?; + 882 => { + self.proto_reference_documentation_uri = is.read_string()?; }, - 110 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.proto_reference_documentation_uri)?; + 890 => { + self.rest_reference_documentation_uri = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1239,11 +703,11 @@ impl ::protobuf::Message for Publishing { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.method_settings { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if !self.new_issue_uri.is_empty() { my_size += ::protobuf::rt::string_size(101, &self.new_issue_uri); @@ -1263,26 +727,27 @@ impl ::protobuf::Message for Publishing { if !self.doc_tag_prefix.is_empty() { my_size += ::protobuf::rt::string_size(106, &self.doc_tag_prefix); } - if self.organization != ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(107, self.organization); + if self.organization != ::protobuf::EnumOrUnknown::new(ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(107, self.organization.value()); } for value in &self.library_settings { let len = value.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if !self.proto_reference_documentation_uri.is_empty() { my_size += ::protobuf::rt::string_size(110, &self.proto_reference_documentation_uri); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + if !self.rest_reference_documentation_uri.is_empty() { + my_size += ::protobuf::rt::string_size(111, &self.rest_reference_documentation_uri); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.method_settings { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }; if !self.new_issue_uri.is_empty() { os.write_string(101, &self.new_issue_uri)?; @@ -1302,120 +767,34 @@ impl ::protobuf::Message for Publishing { if !self.doc_tag_prefix.is_empty() { os.write_string(106, &self.doc_tag_prefix)?; } - if self.organization != ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED { - os.write_enum(107, ::protobuf::ProtobufEnum::value(&self.organization))?; + if self.organization != ::protobuf::EnumOrUnknown::new(ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED) { + os.write_enum(107, ::protobuf::EnumOrUnknown::value(&self.organization))?; } for v in &self.library_settings { - os.write_tag(109, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(109, v, os)?; }; if !self.proto_reference_documentation_uri.is_empty() { os.write_string(110, &self.proto_reference_documentation_uri)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + if !self.rest_reference_documentation_uri.is_empty() { + os.write_string(111, &self.rest_reference_documentation_uri)?; + } + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Publishing { Publishing::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "method_settings", - |m: &Publishing| { &m.method_settings }, - |m: &mut Publishing| { &mut m.method_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "new_issue_uri", - |m: &Publishing| { &m.new_issue_uri }, - |m: &mut Publishing| { &mut m.new_issue_uri }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "documentation_uri", - |m: &Publishing| { &m.documentation_uri }, - |m: &mut Publishing| { &mut m.documentation_uri }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "api_short_name", - |m: &Publishing| { &m.api_short_name }, - |m: &mut Publishing| { &mut m.api_short_name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "github_label", - |m: &Publishing| { &m.github_label }, - |m: &mut Publishing| { &mut m.github_label }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "codeowner_github_teams", - |m: &Publishing| { &m.codeowner_github_teams }, - |m: &mut Publishing| { &mut m.codeowner_github_teams }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "doc_tag_prefix", - |m: &Publishing| { &m.doc_tag_prefix }, - |m: &mut Publishing| { &mut m.doc_tag_prefix }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "organization", - |m: &Publishing| { &m.organization }, - |m: &mut Publishing| { &mut m.organization }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "library_settings", - |m: &Publishing| { &m.library_settings }, - |m: &mut Publishing| { &mut m.library_settings }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "proto_reference_documentation_uri", - |m: &Publishing| { &m.proto_reference_documentation_uri }, - |m: &mut Publishing| { &mut m.proto_reference_documentation_uri }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Publishing", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static Publishing { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Publishing::new) - } -} - -impl ::protobuf::Clear for Publishing { fn clear(&mut self) { self.method_settings.clear(); self.new_issue_uri.clear(); @@ -1424,34 +803,64 @@ impl ::protobuf::Clear for Publishing { self.github_label.clear(); self.codeowner_github_teams.clear(); self.doc_tag_prefix.clear(); - self.organization = ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED; + self.organization = ::protobuf::EnumOrUnknown::new(ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED); self.library_settings.clear(); self.proto_reference_documentation_uri.clear(); - self.unknown_fields.clear(); + self.rest_reference_documentation_uri.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static Publishing { + static instance: Publishing = Publishing { + method_settings: ::std::vec::Vec::new(), + new_issue_uri: ::std::string::String::new(), + documentation_uri: ::std::string::String::new(), + api_short_name: ::std::string::String::new(), + github_label: ::std::string::String::new(), + codeowner_github_teams: ::std::vec::Vec::new(), + doc_tag_prefix: ::std::string::String::new(), + organization: ::protobuf::EnumOrUnknown::from_i32(0), + library_settings: ::std::vec::Vec::new(), + proto_reference_documentation_uri: ::std::string::String::new(), + rest_reference_documentation_uri: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::std::fmt::Debug for Publishing { +impl ::protobuf::MessageFull for Publishing { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Publishing").unwrap()).clone() + } +} + +impl ::std::fmt::Display for Publishing { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Publishing { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Settings for Java client libraries. +// @@protoc_insertion_point(message:google.api.JavaSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct JavaSettings { // message fields + // @@protoc_insertion_point(field:google.api.JavaSettings.library_package) pub library_package: ::std::string::String, + // @@protoc_insertion_point(field:google.api.JavaSettings.service_class_names) pub service_class_names: ::std::collections::HashMap<::std::string::String, ::std::string::String>, - pub common: ::protobuf::SingularPtrField, + /// Some settings. + // @@protoc_insertion_point(field:google.api.JavaSettings.common) + pub common: ::protobuf::MessageField, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.JavaSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a JavaSettings { @@ -1465,116 +874,65 @@ impl JavaSettings { ::std::default::Default::default() } - // string library_package = 1; - - - pub fn get_library_package(&self) -> &str { - &self.library_package - } - pub fn clear_library_package(&mut self) { - self.library_package.clear(); - } - - // Param is passed by value, moved - pub fn set_library_package(&mut self, v: ::std::string::String) { - self.library_package = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_library_package(&mut self) -> &mut ::std::string::String { - &mut self.library_package - } - - // Take field - pub fn take_library_package(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.library_package, ::std::string::String::new()) - } - - // repeated .google.api.JavaSettings.ServiceClassNamesEntry service_class_names = 2; - - - pub fn get_service_class_names(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.service_class_names - } - pub fn clear_service_class_names(&mut self) { - self.service_class_names.clear(); - } - - // Param is passed by value, moved - pub fn set_service_class_names(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.service_class_names = v; - } - - // Mutable pointer to the field. - pub fn mut_service_class_names(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.service_class_names - } - - // Take field - pub fn take_service_class_names(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.service_class_names, ::std::collections::HashMap::new()) - } - - // .google.api.CommonLanguageSettings common = 3; - - - pub fn get_common(&self) -> &CommonLanguageSettings { - self.common.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_common(&mut self) { - self.common.clear(); - } - - pub fn has_common(&self) -> bool { - self.common.is_some() - } - - // Param is passed by value, moved - pub fn set_common(&mut self, v: CommonLanguageSettings) { - self.common = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_common(&mut self) -> &mut CommonLanguageSettings { - if self.common.is_none() { - self.common.set_default(); - } - self.common.as_mut().unwrap() - } - - // Take field - pub fn take_common(&mut self) -> CommonLanguageSettings { - self.common.take().unwrap_or_else(|| CommonLanguageSettings::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "library_package", + |m: &JavaSettings| { &m.library_package }, + |m: &mut JavaSettings| { &mut m.library_package }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "service_class_names", + |m: &JavaSettings| { &m.service_class_names }, + |m: &mut JavaSettings| { &mut m.service_class_names }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CommonLanguageSettings>( + "common", + |m: &JavaSettings| { &m.common }, + |m: &mut JavaSettings| { &mut m.common }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "JavaSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for JavaSettings { + const NAME: &'static str = "JavaSettings"; + fn is_initialized(&self) -> bool { - for v in &self.common { - 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.library_package)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.library_package = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.service_class_names)?; + 18 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 18 => value = is.read_string()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.service_class_names.insert(key, value); }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.common)?; + 26 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.common)?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1583,126 +941,99 @@ impl ::protobuf::Message for JavaSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.library_package.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.library_package); } - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.service_class_names); - if let Some(ref v) = self.common.as_ref() { + for (k, v) in &self.service_class_names { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; + if let Some(v) = self.common.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.library_package.is_empty() { os.write_string(1, &self.library_package)?; } - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.service_class_names, os)?; - if let Some(ref v) = self.common.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)?; + for (k, v) in &self.service_class_names { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + os.write_raw_varint32(18)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + os.write_string(2, &v)?; + }; + if let Some(v) = self.common.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> JavaSettings { JavaSettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "library_package", - |m: &JavaSettings| { &m.library_package }, - |m: &mut JavaSettings| { &mut m.library_package }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>( - "service_class_names", - |m: &JavaSettings| { &m.service_class_names }, - |m: &mut JavaSettings| { &mut m.service_class_names }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "common", - |m: &JavaSettings| { &m.common }, - |m: &mut JavaSettings| { &mut m.common }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "JavaSettings", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.library_package.clear(); + self.service_class_names.clear(); + self.common.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static JavaSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); instance.get(JavaSettings::new) } } -impl ::protobuf::Clear for JavaSettings { - fn clear(&mut self) { - self.library_package.clear(); - self.service_class_names.clear(); - self.common.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for JavaSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("JavaSettings").unwrap()).clone() } } -impl ::std::fmt::Debug for JavaSettings { +impl ::std::fmt::Display for JavaSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for JavaSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Settings for C++ client libraries. +// @@protoc_insertion_point(message:google.api.CppSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct CppSettings { // message fields - pub common: ::protobuf::SingularPtrField, + /// Some settings. + // @@protoc_insertion_point(field:google.api.CppSettings.common) + pub common: ::protobuf::MessageField, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.CppSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CppSettings { @@ -1716,59 +1047,37 @@ impl CppSettings { ::std::default::Default::default() } - // .google.api.CommonLanguageSettings common = 1; - - - pub fn get_common(&self) -> &CommonLanguageSettings { - self.common.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_common(&mut self) { - self.common.clear(); - } - - pub fn has_common(&self) -> bool { - self.common.is_some() - } - - // Param is passed by value, moved - pub fn set_common(&mut self, v: CommonLanguageSettings) { - self.common = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_common(&mut self) -> &mut CommonLanguageSettings { - if self.common.is_none() { - self.common.set_default(); - } - self.common.as_mut().unwrap() - } - - // Take field - pub fn take_common(&mut self) -> CommonLanguageSettings { - self.common.take().unwrap_or_else(|| CommonLanguageSettings::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CommonLanguageSettings>( + "common", + |m: &CppSettings| { &m.common }, + |m: &mut CppSettings| { &mut m.common }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "CppSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for CppSettings { + const NAME: &'static str = "CppSettings"; + fn is_initialized(&self) -> bool { - for v in &self.common { - 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_message_into(wire_type, is, &mut self.common)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.common)?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1777,106 +1086,79 @@ impl ::protobuf::Message for CppSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.common.as_ref() { + if let Some(v) = self.common.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.common.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.common.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> CppSettings { CppSettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "common", - |m: &CppSettings| { &m.common }, - |m: &mut CppSettings| { &mut m.common }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CppSettings", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.common.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static CppSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CppSettings::new) + static instance: CppSettings = CppSettings { + common: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for CppSettings { - fn clear(&mut self) { - self.common.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for CppSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("CppSettings").unwrap()).clone() } } -impl ::std::fmt::Debug for CppSettings { +impl ::std::fmt::Display for CppSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CppSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Settings for Php client libraries. +// @@protoc_insertion_point(message:google.api.PhpSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct PhpSettings { // message fields - pub common: ::protobuf::SingularPtrField, + /// Some settings. + // @@protoc_insertion_point(field:google.api.PhpSettings.common) + pub common: ::protobuf::MessageField, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.PhpSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a PhpSettings { @@ -1890,59 +1172,37 @@ impl PhpSettings { ::std::default::Default::default() } - // .google.api.CommonLanguageSettings common = 1; - - - pub fn get_common(&self) -> &CommonLanguageSettings { - self.common.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_common(&mut self) { - self.common.clear(); - } - - pub fn has_common(&self) -> bool { - self.common.is_some() - } - - // Param is passed by value, moved - pub fn set_common(&mut self, v: CommonLanguageSettings) { - self.common = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_common(&mut self) -> &mut CommonLanguageSettings { - if self.common.is_none() { - self.common.set_default(); - } - self.common.as_mut().unwrap() - } - - // Take field - pub fn take_common(&mut self) -> CommonLanguageSettings { - self.common.take().unwrap_or_else(|| CommonLanguageSettings::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CommonLanguageSettings>( + "common", + |m: &PhpSettings| { &m.common }, + |m: &mut PhpSettings| { &mut m.common }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "PhpSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for PhpSettings { - fn is_initialized(&self) -> bool { - for v in &self.common { - if !v.is_initialized() { - return false; - } - }; + const NAME: &'static str = "PhpSettings"; + + 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_message_into(wire_type, is, &mut self.common)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.common)?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1951,106 +1211,82 @@ impl ::protobuf::Message for PhpSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.common.as_ref() { + if let Some(v) = self.common.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.common.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.common.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> PhpSettings { PhpSettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "common", - |m: &PhpSettings| { &m.common }, - |m: &mut PhpSettings| { &mut m.common }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "PhpSettings", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.common.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static PhpSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PhpSettings::new) + static instance: PhpSettings = PhpSettings { + common: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for PhpSettings { - fn clear(&mut self) { - self.common.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for PhpSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("PhpSettings").unwrap()).clone() } } -impl ::std::fmt::Debug for PhpSettings { +impl ::std::fmt::Display for PhpSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for PhpSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Settings for Python client libraries. +// @@protoc_insertion_point(message:google.api.PythonSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct PythonSettings { // message fields - pub common: ::protobuf::SingularPtrField, + /// Some settings. + // @@protoc_insertion_point(field:google.api.PythonSettings.common) + pub common: ::protobuf::MessageField, + /// Experimental features to be included during client library generation. + // @@protoc_insertion_point(field:google.api.PythonSettings.experimental_features) + pub experimental_features: ::protobuf::MessageField, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.PythonSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a PythonSettings { @@ -2064,59 +1300,45 @@ impl PythonSettings { ::std::default::Default::default() } - // .google.api.CommonLanguageSettings common = 1; - - - pub fn get_common(&self) -> &CommonLanguageSettings { - self.common.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_common(&mut self) { - self.common.clear(); - } - - pub fn has_common(&self) -> bool { - self.common.is_some() - } - - // Param is passed by value, moved - pub fn set_common(&mut self, v: CommonLanguageSettings) { - self.common = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_common(&mut self) -> &mut CommonLanguageSettings { - if self.common.is_none() { - self.common.set_default(); - } - self.common.as_mut().unwrap() - } - - // Take field - pub fn take_common(&mut self) -> CommonLanguageSettings { - self.common.take().unwrap_or_else(|| CommonLanguageSettings::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CommonLanguageSettings>( + "common", + |m: &PythonSettings| { &m.common }, + |m: &mut PythonSettings| { &mut m.common }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, python_settings::ExperimentalFeatures>( + "experimental_features", + |m: &PythonSettings| { &m.experimental_features }, + |m: &mut PythonSettings| { &mut m.experimental_features }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "PythonSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for PythonSettings { + const NAME: &'static str = "PythonSettings"; + fn is_initialized(&self) -> bool { - for v in &self.common { - 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_message_into(wire_type, is, &mut self.common)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.common)?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + 18 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.experimental_features)?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -2125,106 +1347,220 @@ impl ::protobuf::Message for PythonSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.common.as_ref() { + if let Some(v) = self.common.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.experimental_features.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.common.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.common.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + } + if let Some(v) = self.experimental_features.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields + fn new() -> PythonSettings { + PythonSettings::new() } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) + fn clear(&mut self) { + self.common.clear(); + self.experimental_features.clear(); + self.special_fields.clear(); } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + + fn default_instance() -> &'static PythonSettings { + static instance: PythonSettings = PythonSettings { + common: ::protobuf::MessageField::none(), + experimental_features: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } +} - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() +impl ::protobuf::MessageFull for PythonSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("PythonSettings").unwrap()).clone() } +} - fn new() -> PythonSettings { - PythonSettings::new() +impl ::std::fmt::Display for PythonSettings { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) } +} - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "common", - |m: &PythonSettings| { &m.common }, - |m: &mut PythonSettings| { &mut m.common }, +impl ::protobuf::reflect::ProtobufValue for PythonSettings { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +/// Nested message and enums of message `PythonSettings` +pub mod python_settings { + /// Experimental features to be included during client library generation. + /// These fields will be deprecated once the feature graduates and is enabled + /// by default. + // @@protoc_insertion_point(message:google.api.PythonSettings.ExperimentalFeatures) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct ExperimentalFeatures { + // message fields + /// Enables generation of asynchronous REST clients if `rest` transport is + /// enabled. By default, asynchronous REST clients will not be generated. + /// This feature will be enabled by default 1 month after launching the + /// feature in preview packages. + // @@protoc_insertion_point(field:google.api.PythonSettings.ExperimentalFeatures.rest_async_io_enabled) + pub rest_async_io_enabled: bool, + // special fields + // @@protoc_insertion_point(special_field:google.api.PythonSettings.ExperimentalFeatures.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a ExperimentalFeatures { + fn default() -> &'a ExperimentalFeatures { + ::default_instance() + } + } + + impl ExperimentalFeatures { + pub fn new() -> ExperimentalFeatures { + ::std::default::Default::default() + } + + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "rest_async_io_enabled", + |m: &ExperimentalFeatures| { &m.rest_async_io_enabled }, + |m: &mut ExperimentalFeatures| { &mut m.rest_async_io_enabled }, )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "PythonSettings", + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "PythonSettings.ExperimentalFeatures", fields, - file_descriptor_proto() + oneofs, ) - }) + } } - fn default_instance() -> &'static PythonSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PythonSettings::new) + impl ::protobuf::Message for ExperimentalFeatures { + const NAME: &'static str = "ExperimentalFeatures"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.rest_async_io_enabled = is.read_bool()?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if self.rest_async_io_enabled != false { + my_size += 1 + 1; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if self.rest_async_io_enabled != false { + os.write_bool(1, self.rest_async_io_enabled)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> ExperimentalFeatures { + ExperimentalFeatures::new() + } + + fn clear(&mut self) { + self.rest_async_io_enabled = false; + self.special_fields.clear(); + } + + fn default_instance() -> &'static ExperimentalFeatures { + static instance: ExperimentalFeatures = ExperimentalFeatures { + rest_async_io_enabled: false, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } } -} -impl ::protobuf::Clear for PythonSettings { - fn clear(&mut self) { - self.common.clear(); - self.unknown_fields.clear(); + impl ::protobuf::MessageFull for ExperimentalFeatures { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("PythonSettings.ExperimentalFeatures").unwrap()).clone() + } } -} -impl ::std::fmt::Debug for PythonSettings { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + impl ::std::fmt::Display for ExperimentalFeatures { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } -} -impl ::protobuf::reflect::ProtobufValue for PythonSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) + impl ::protobuf::reflect::ProtobufValue for ExperimentalFeatures { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } } -#[derive(PartialEq,Clone,Default)] +/// Settings for Node client libraries. +// @@protoc_insertion_point(message:google.api.NodeSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct NodeSettings { // message fields - pub common: ::protobuf::SingularPtrField, + /// Some settings. + // @@protoc_insertion_point(field:google.api.NodeSettings.common) + pub common: ::protobuf::MessageField, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.NodeSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a NodeSettings { @@ -2238,59 +1574,37 @@ impl NodeSettings { ::std::default::Default::default() } - // .google.api.CommonLanguageSettings common = 1; - - - pub fn get_common(&self) -> &CommonLanguageSettings { - self.common.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_common(&mut self) { - self.common.clear(); - } - - pub fn has_common(&self) -> bool { - self.common.is_some() - } - - // Param is passed by value, moved - pub fn set_common(&mut self, v: CommonLanguageSettings) { - self.common = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_common(&mut self) -> &mut CommonLanguageSettings { - if self.common.is_none() { - self.common.set_default(); - } - self.common.as_mut().unwrap() - } - - // Take field - pub fn take_common(&mut self) -> CommonLanguageSettings { - self.common.take().unwrap_or_else(|| CommonLanguageSettings::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CommonLanguageSettings>( + "common", + |m: &NodeSettings| { &m.common }, + |m: &mut NodeSettings| { &mut m.common }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "NodeSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for NodeSettings { + const NAME: &'static str = "NodeSettings"; + fn is_initialized(&self) -> bool { - for v in &self.common { - 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_message_into(wire_type, is, &mut self.common)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.common)?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -2299,111 +1613,109 @@ impl ::protobuf::Message for NodeSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.common.as_ref() { + if let Some(v) = self.common.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.common.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.common.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> NodeSettings { NodeSettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "common", - |m: &NodeSettings| { &m.common }, - |m: &mut NodeSettings| { &mut m.common }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "NodeSettings", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.common.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static NodeSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(NodeSettings::new) + static instance: NodeSettings = NodeSettings { + common: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for NodeSettings { - fn clear(&mut self) { - self.common.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for NodeSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("NodeSettings").unwrap()).clone() } } -impl ::std::fmt::Debug for NodeSettings { +impl ::std::fmt::Display for NodeSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for NodeSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Settings for Dotnet client libraries. +// @@protoc_insertion_point(message:google.api.DotnetSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct DotnetSettings { // message fields - pub common: ::protobuf::SingularPtrField, + /// Some settings. + // @@protoc_insertion_point(field:google.api.DotnetSettings.common) + pub common: ::protobuf::MessageField, + /// Map from original service names to renamed versions. + /// This is used when the default generated types + /// would cause a naming conflict. (Neither name is + /// fully-qualified.) + /// Example: Subscriber to SubscriberServiceApi. + // @@protoc_insertion_point(field:google.api.DotnetSettings.renamed_services) pub renamed_services: ::std::collections::HashMap<::std::string::String, ::std::string::String>, + /// Map from full resource types to the effective short name + /// for the resource. This is used when otherwise resource + /// named from different services would cause naming collisions. + /// Example entry: + /// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + // @@protoc_insertion_point(field:google.api.DotnetSettings.renamed_resources) pub renamed_resources: ::std::collections::HashMap<::std::string::String, ::std::string::String>, - pub ignored_resources: ::protobuf::RepeatedField<::std::string::String>, - pub forced_namespace_aliases: ::protobuf::RepeatedField<::std::string::String>, - pub handwritten_signatures: ::protobuf::RepeatedField<::std::string::String>, + /// List of full resource types to ignore during generation. + /// This is typically used for API-specific Location resources, + /// which should be handled by the generator as if they were actually + /// the common Location resources. + /// Example entry: "documentai.googleapis.com/Location" + // @@protoc_insertion_point(field:google.api.DotnetSettings.ignored_resources) + pub ignored_resources: ::std::vec::Vec<::std::string::String>, + /// Namespaces which must be aliased in snippets due to + /// a known (but non-generator-predictable) naming collision + // @@protoc_insertion_point(field:google.api.DotnetSettings.forced_namespace_aliases) + pub forced_namespace_aliases: ::std::vec::Vec<::std::string::String>, + /// Method signatures (in the form "service.method(signature)") + /// which are provided separately, so shouldn't be generated. + /// Snippets *calling* these methods are still generated, however. + // @@protoc_insertion_point(field:google.api.DotnetSettings.handwritten_signatures) + pub handwritten_signatures: ::std::vec::Vec<::std::string::String>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.DotnetSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DotnetSettings { @@ -2417,199 +1729,101 @@ impl DotnetSettings { ::std::default::Default::default() } - // .google.api.CommonLanguageSettings common = 1; - - - pub fn get_common(&self) -> &CommonLanguageSettings { - self.common.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_common(&mut self) { - self.common.clear(); - } - - pub fn has_common(&self) -> bool { - self.common.is_some() - } - - // Param is passed by value, moved - pub fn set_common(&mut self, v: CommonLanguageSettings) { - self.common = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_common(&mut self) -> &mut CommonLanguageSettings { - if self.common.is_none() { - self.common.set_default(); - } - self.common.as_mut().unwrap() - } - - // Take field - pub fn take_common(&mut self) -> CommonLanguageSettings { - self.common.take().unwrap_or_else(|| CommonLanguageSettings::new()) - } - - // repeated .google.api.DotnetSettings.RenamedServicesEntry renamed_services = 2; - - - pub fn get_renamed_services(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.renamed_services - } - pub fn clear_renamed_services(&mut self) { - self.renamed_services.clear(); - } - - // Param is passed by value, moved - pub fn set_renamed_services(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.renamed_services = v; - } - - // Mutable pointer to the field. - pub fn mut_renamed_services(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.renamed_services - } - - // Take field - pub fn take_renamed_services(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.renamed_services, ::std::collections::HashMap::new()) - } - - // repeated .google.api.DotnetSettings.RenamedResourcesEntry renamed_resources = 3; - - - pub fn get_renamed_resources(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.renamed_resources - } - pub fn clear_renamed_resources(&mut self) { - self.renamed_resources.clear(); - } - - // Param is passed by value, moved - pub fn set_renamed_resources(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.renamed_resources = v; - } - - // Mutable pointer to the field. - pub fn mut_renamed_resources(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.renamed_resources - } - - // Take field - pub fn take_renamed_resources(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.renamed_resources, ::std::collections::HashMap::new()) - } - - // repeated string ignored_resources = 4; - - - pub fn get_ignored_resources(&self) -> &[::std::string::String] { - &self.ignored_resources - } - pub fn clear_ignored_resources(&mut self) { - self.ignored_resources.clear(); - } - - // Param is passed by value, moved - pub fn set_ignored_resources(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.ignored_resources = v; - } - - // Mutable pointer to the field. - pub fn mut_ignored_resources(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.ignored_resources - } - - // Take field - pub fn take_ignored_resources(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.ignored_resources, ::protobuf::RepeatedField::new()) - } - - // repeated string forced_namespace_aliases = 5; - - - pub fn get_forced_namespace_aliases(&self) -> &[::std::string::String] { - &self.forced_namespace_aliases - } - pub fn clear_forced_namespace_aliases(&mut self) { - self.forced_namespace_aliases.clear(); - } - - // Param is passed by value, moved - pub fn set_forced_namespace_aliases(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.forced_namespace_aliases = v; - } - - // Mutable pointer to the field. - pub fn mut_forced_namespace_aliases(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.forced_namespace_aliases - } - - // Take field - pub fn take_forced_namespace_aliases(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.forced_namespace_aliases, ::protobuf::RepeatedField::new()) - } - - // repeated string handwritten_signatures = 6; - - - pub fn get_handwritten_signatures(&self) -> &[::std::string::String] { - &self.handwritten_signatures - } - pub fn clear_handwritten_signatures(&mut self) { - self.handwritten_signatures.clear(); - } - - // Param is passed by value, moved - pub fn set_handwritten_signatures(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.handwritten_signatures = v; - } - - // Mutable pointer to the field. - pub fn mut_handwritten_signatures(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.handwritten_signatures - } - - // Take field - pub fn take_handwritten_signatures(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.handwritten_signatures, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(6); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CommonLanguageSettings>( + "common", + |m: &DotnetSettings| { &m.common }, + |m: &mut DotnetSettings| { &mut m.common }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "renamed_services", + |m: &DotnetSettings| { &m.renamed_services }, + |m: &mut DotnetSettings| { &mut m.renamed_services }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "renamed_resources", + |m: &DotnetSettings| { &m.renamed_resources }, + |m: &mut DotnetSettings| { &mut m.renamed_resources }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "ignored_resources", + |m: &DotnetSettings| { &m.ignored_resources }, + |m: &mut DotnetSettings| { &mut m.ignored_resources }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "forced_namespace_aliases", + |m: &DotnetSettings| { &m.forced_namespace_aliases }, + |m: &mut DotnetSettings| { &mut m.forced_namespace_aliases }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "handwritten_signatures", + |m: &DotnetSettings| { &m.handwritten_signatures }, + |m: &mut DotnetSettings| { &mut m.handwritten_signatures }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "DotnetSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for DotnetSettings { + const NAME: &'static str = "DotnetSettings"; + fn is_initialized(&self) -> bool { - for v in &self.common { - 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_message_into(wire_type, is, &mut self.common)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.common)?; }, - 2 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.renamed_services)?; + 18 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 18 => value = is.read_string()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.renamed_services.insert(key, value); }, - 3 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.renamed_resources)?; + 26 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 18 => value = is.read_string()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.renamed_resources.insert(key, value); }, - 4 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.ignored_resources)?; + 34 => { + self.ignored_resources.push(is.read_string()?); }, - 5 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.forced_namespace_aliases)?; + 42 => { + self.forced_namespace_aliases.push(is.read_string()?); }, - 6 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.handwritten_signatures)?; + 50 => { + self.handwritten_signatures.push(is.read_string()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -2618,14 +1832,24 @@ impl ::protobuf::Message for DotnetSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.common.as_ref() { + if let Some(v) = self.common.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.renamed_services); - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(3, &self.renamed_resources); + for (k, v) in &self.renamed_services { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; + for (k, v) in &self.renamed_resources { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; for value in &self.ignored_resources { my_size += ::protobuf::rt::string_size(4, &value); }; @@ -2635,19 +1859,33 @@ impl ::protobuf::Message for DotnetSettings { for value in &self.handwritten_signatures { my_size += ::protobuf::rt::string_size(6, &value); }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.common.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.common.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.renamed_services, os)?; - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(3, &self.renamed_resources, os)?; + for (k, v) in &self.renamed_services { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + os.write_raw_varint32(18)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + os.write_string(2, &v)?; + }; + for (k, v) in &self.renamed_resources { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + os.write_raw_varint32(26)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + os.write_string(2, &v)?; + }; for v in &self.ignored_resources { os.write_string(4, &v)?; }; @@ -2657,89 +1895,22 @@ impl ::protobuf::Message for DotnetSettings { for v in &self.handwritten_signatures { os.write_string(6, &v)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> DotnetSettings { DotnetSettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "common", - |m: &DotnetSettings| { &m.common }, - |m: &mut DotnetSettings| { &mut m.common }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>( - "renamed_services", - |m: &DotnetSettings| { &m.renamed_services }, - |m: &mut DotnetSettings| { &mut m.renamed_services }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>( - "renamed_resources", - |m: &DotnetSettings| { &m.renamed_resources }, - |m: &mut DotnetSettings| { &mut m.renamed_resources }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "ignored_resources", - |m: &DotnetSettings| { &m.ignored_resources }, - |m: &mut DotnetSettings| { &mut m.ignored_resources }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "forced_namespace_aliases", - |m: &DotnetSettings| { &m.forced_namespace_aliases }, - |m: &mut DotnetSettings| { &mut m.forced_namespace_aliases }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "handwritten_signatures", - |m: &DotnetSettings| { &m.handwritten_signatures }, - |m: &mut DotnetSettings| { &mut m.handwritten_signatures }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "DotnetSettings", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static DotnetSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DotnetSettings::new) - } -} - -impl ::protobuf::Clear for DotnetSettings { fn clear(&mut self) { self.common.clear(); self.renamed_services.clear(); @@ -2747,95 +1918,87 @@ impl ::protobuf::Clear for DotnetSettings { self.ignored_resources.clear(); self.forced_namespace_aliases.clear(); self.handwritten_signatures.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); } -} -impl ::std::fmt::Debug for DotnetSettings { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + fn default_instance() -> &'static DotnetSettings { + static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); + instance.get(DotnetSettings::new) } } -impl ::protobuf::reflect::ProtobufValue for DotnetSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) +impl ::protobuf::MessageFull for DotnetSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("DotnetSettings").unwrap()).clone() } } -#[derive(PartialEq,Clone,Default)] -pub struct RubySettings { - // message fields - pub common: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a RubySettings { - fn default() -> &'a RubySettings { - ::default_instance() +impl ::std::fmt::Display for DotnetSettings { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) } } -impl RubySettings { - pub fn new() -> RubySettings { - ::std::default::Default::default() - } - - // .google.api.CommonLanguageSettings common = 1; - - - pub fn get_common(&self) -> &CommonLanguageSettings { - self.common.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_common(&mut self) { - self.common.clear(); - } +impl ::protobuf::reflect::ProtobufValue for DotnetSettings { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} - pub fn has_common(&self) -> bool { - self.common.is_some() - } +/// Settings for Ruby client libraries. +// @@protoc_insertion_point(message:google.api.RubySettings) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RubySettings { + // message fields + /// Some settings. + // @@protoc_insertion_point(field:google.api.RubySettings.common) + pub common: ::protobuf::MessageField, + // special fields + // @@protoc_insertion_point(special_field:google.api.RubySettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} - // Param is passed by value, moved - pub fn set_common(&mut self, v: CommonLanguageSettings) { - self.common = ::protobuf::SingularPtrField::some(v); +impl<'a> ::std::default::Default for &'a RubySettings { + fn default() -> &'a RubySettings { + ::default_instance() } +} - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_common(&mut self) -> &mut CommonLanguageSettings { - if self.common.is_none() { - self.common.set_default(); - } - self.common.as_mut().unwrap() +impl RubySettings { + pub fn new() -> RubySettings { + ::std::default::Default::default() } - // Take field - pub fn take_common(&mut self) -> CommonLanguageSettings { - self.common.take().unwrap_or_else(|| CommonLanguageSettings::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CommonLanguageSettings>( + "common", + |m: &RubySettings| { &m.common }, + |m: &mut RubySettings| { &mut m.common }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "RubySettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for RubySettings { + const NAME: &'static str = "RubySettings"; + fn is_initialized(&self) -> bool { - for v in &self.common { - 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_message_into(wire_type, is, &mut self.common)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.common)?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -2844,106 +2007,79 @@ impl ::protobuf::Message for RubySettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.common.as_ref() { + if let Some(v) = self.common.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.common.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.common.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> RubySettings { RubySettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "common", - |m: &RubySettings| { &m.common }, - |m: &mut RubySettings| { &mut m.common }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RubySettings", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.common.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static RubySettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(RubySettings::new) + static instance: RubySettings = RubySettings { + common: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for RubySettings { - fn clear(&mut self) { - self.common.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for RubySettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("RubySettings").unwrap()).clone() } } -impl ::std::fmt::Debug for RubySettings { +impl ::std::fmt::Display for RubySettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for RubySettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Settings for Go client libraries. +// @@protoc_insertion_point(message:google.api.GoSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct GoSettings { // message fields - pub common: ::protobuf::SingularPtrField, + /// Some settings. + // @@protoc_insertion_point(field:google.api.GoSettings.common) + pub common: ::protobuf::MessageField, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.GoSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a GoSettings { @@ -2957,59 +2093,37 @@ impl GoSettings { ::std::default::Default::default() } - // .google.api.CommonLanguageSettings common = 1; - - - pub fn get_common(&self) -> &CommonLanguageSettings { - self.common.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_common(&mut self) { - self.common.clear(); - } - - pub fn has_common(&self) -> bool { - self.common.is_some() - } - - // Param is passed by value, moved - pub fn set_common(&mut self, v: CommonLanguageSettings) { - self.common = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_common(&mut self) -> &mut CommonLanguageSettings { - if self.common.is_none() { - self.common.set_default(); - } - self.common.as_mut().unwrap() - } - - // Take field - pub fn take_common(&mut self) -> CommonLanguageSettings { - self.common.take().unwrap_or_else(|| CommonLanguageSettings::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CommonLanguageSettings>( + "common", + |m: &GoSettings| { &m.common }, + |m: &mut GoSettings| { &mut m.common }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "GoSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for GoSettings { + const NAME: &'static str = "GoSettings"; + fn is_initialized(&self) -> bool { - for v in &self.common { - 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_message_into(wire_type, is, &mut self.common)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.common)?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -3018,107 +2132,82 @@ impl ::protobuf::Message for GoSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.common.as_ref() { + if let Some(v) = self.common.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.common.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.common.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> GoSettings { GoSettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "common", - |m: &GoSettings| { &m.common }, - |m: &mut GoSettings| { &mut m.common }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "GoSettings", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.common.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static GoSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(GoSettings::new) + static instance: GoSettings = GoSettings { + common: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for GoSettings { - fn clear(&mut self) { - self.common.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for GoSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("GoSettings").unwrap()).clone() } } -impl ::std::fmt::Debug for GoSettings { +impl ::std::fmt::Display for GoSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for GoSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Describes the generator configuration for a method. +// @@protoc_insertion_point(message:google.api.MethodSettings) +#[derive(PartialEq,Clone,Default,Debug)] pub struct MethodSettings { // message fields + // @@protoc_insertion_point(field:google.api.MethodSettings.selector) pub selector: ::std::string::String, - pub long_running: ::protobuf::SingularPtrField, + // @@protoc_insertion_point(field:google.api.MethodSettings.long_running) + pub long_running: ::protobuf::MessageField, + // @@protoc_insertion_point(field:google.api.MethodSettings.auto_populated_fields) + pub auto_populated_fields: ::std::vec::Vec<::std::string::String>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.MethodSettings.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a MethodSettings { @@ -3132,88 +2221,53 @@ impl MethodSettings { ::std::default::Default::default() } - // string selector = 1; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - - // .google.api.MethodSettings.LongRunning long_running = 2; - - - pub fn get_long_running(&self) -> &MethodSettings_LongRunning { - self.long_running.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_long_running(&mut self) { - self.long_running.clear(); - } - - pub fn has_long_running(&self) -> bool { - self.long_running.is_some() - } - - // Param is passed by value, moved - pub fn set_long_running(&mut self, v: MethodSettings_LongRunning) { - self.long_running = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_long_running(&mut self) -> &mut MethodSettings_LongRunning { - if self.long_running.is_none() { - self.long_running.set_default(); - } - self.long_running.as_mut().unwrap() - } - - // Take field - pub fn take_long_running(&mut self) -> MethodSettings_LongRunning { - self.long_running.take().unwrap_or_else(|| MethodSettings_LongRunning::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &MethodSettings| { &m.selector }, + |m: &mut MethodSettings| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, method_settings::LongRunning>( + "long_running", + |m: &MethodSettings| { &m.long_running }, + |m: &mut MethodSettings| { &mut m.long_running }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "auto_populated_fields", + |m: &MethodSettings| { &m.auto_populated_fields }, + |m: &mut MethodSettings| { &mut m.auto_populated_fields }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MethodSettings", + fields, + oneofs, + ) } } impl ::protobuf::Message for MethodSettings { + const NAME: &'static str = "MethodSettings"; + fn is_initialized(&self) -> bool { - for v in &self.long_running { - 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.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.selector = is.read_string()?; + }, + 18 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.long_running)?; }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.long_running)?; + 26 => { + self.auto_populated_fields.push(is.read_string()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -3222,291 +2276,337 @@ impl ::protobuf::Message for MethodSettings { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.selector); } - if let Some(ref v) = self.long_running.as_ref() { + if let Some(v) = self.long_running.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + for value in &self.auto_populated_fields { + my_size += ::protobuf::rt::string_size(3, &value); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(1, &self.selector)?; } - if let Some(ref v) = self.long_running.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(v) = self.long_running.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + for v in &self.auto_populated_fields { + os.write_string(3, &v)?; + }; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> MethodSettings { MethodSettings::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &MethodSettings| { &m.selector }, - |m: &mut MethodSettings| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "long_running", - |m: &MethodSettings| { &m.long_running }, - |m: &mut MethodSettings| { &mut m.long_running }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MethodSettings", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.selector.clear(); + self.long_running.clear(); + self.auto_populated_fields.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static MethodSettings { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MethodSettings::new) + static instance: MethodSettings = MethodSettings { + selector: ::std::string::String::new(), + long_running: ::protobuf::MessageField::none(), + auto_populated_fields: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for MethodSettings { - fn clear(&mut self) { - self.selector.clear(); - self.long_running.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for MethodSettings { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MethodSettings").unwrap()).clone() } } -impl ::std::fmt::Debug for MethodSettings { +impl ::std::fmt::Display for MethodSettings { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for MethodSettings { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct MethodSettings_LongRunning { - // message fields - pub initial_poll_delay: ::protobuf::SingularPtrField<::protobuf::well_known_types::Duration>, - pub poll_delay_multiplier: f32, - pub max_poll_delay: ::protobuf::SingularPtrField<::protobuf::well_known_types::Duration>, - pub total_poll_timeout: ::protobuf::SingularPtrField<::protobuf::well_known_types::Duration>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MethodSettings_LongRunning { - fn default() -> &'a MethodSettings_LongRunning { - ::default_instance() - } -} - -impl MethodSettings_LongRunning { - pub fn new() -> MethodSettings_LongRunning { - ::std::default::Default::default() - } - - // .google.protobuf.Duration initial_poll_delay = 1; - - - pub fn get_initial_poll_delay(&self) -> &::protobuf::well_known_types::Duration { - self.initial_poll_delay.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Duration as ::protobuf::Message>::default_instance()) - } - pub fn clear_initial_poll_delay(&mut self) { - self.initial_poll_delay.clear(); - } - - pub fn has_initial_poll_delay(&self) -> bool { - self.initial_poll_delay.is_some() - } - - // Param is passed by value, moved - pub fn set_initial_poll_delay(&mut self, v: ::protobuf::well_known_types::Duration) { - self.initial_poll_delay = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_initial_poll_delay(&mut self) -> &mut ::protobuf::well_known_types::Duration { - if self.initial_poll_delay.is_none() { - self.initial_poll_delay.set_default(); + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +/// Nested message and enums of message `MethodSettings` +pub mod method_settings { + /// Describes settings to use when generating API methods that use the + /// long-running operation pattern. + /// All default values below are from those used in the client library + /// generators (e.g. + /// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + // @@protoc_insertion_point(message:google.api.MethodSettings.LongRunning) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct LongRunning { + // message fields + /// Initial delay after which the first poll request will be made. + /// Default value: 5 seconds. + // @@protoc_insertion_point(field:google.api.MethodSettings.LongRunning.initial_poll_delay) + pub initial_poll_delay: ::protobuf::MessageField<::protobuf::well_known_types::duration::Duration>, + /// Multiplier to gradually increase delay between subsequent polls until it + /// reaches max_poll_delay. + /// Default value: 1.5. + // @@protoc_insertion_point(field:google.api.MethodSettings.LongRunning.poll_delay_multiplier) + pub poll_delay_multiplier: f32, + /// Maximum time between two subsequent poll requests. + /// Default value: 45 seconds. + // @@protoc_insertion_point(field:google.api.MethodSettings.LongRunning.max_poll_delay) + pub max_poll_delay: ::protobuf::MessageField<::protobuf::well_known_types::duration::Duration>, + /// Total polling timeout. + /// Default value: 5 minutes. + // @@protoc_insertion_point(field:google.api.MethodSettings.LongRunning.total_poll_timeout) + pub total_poll_timeout: ::protobuf::MessageField<::protobuf::well_known_types::duration::Duration>, + // special fields + // @@protoc_insertion_point(special_field:google.api.MethodSettings.LongRunning.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a LongRunning { + fn default() -> &'a LongRunning { + ::default_instance() + } + } + + impl LongRunning { + pub fn new() -> LongRunning { + ::std::default::Default::default() + } + + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(4); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::duration::Duration>( + "initial_poll_delay", + |m: &LongRunning| { &m.initial_poll_delay }, + |m: &mut LongRunning| { &mut m.initial_poll_delay }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "poll_delay_multiplier", + |m: &LongRunning| { &m.poll_delay_multiplier }, + |m: &mut LongRunning| { &mut m.poll_delay_multiplier }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::duration::Duration>( + "max_poll_delay", + |m: &LongRunning| { &m.max_poll_delay }, + |m: &mut LongRunning| { &mut m.max_poll_delay }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::duration::Duration>( + "total_poll_timeout", + |m: &LongRunning| { &m.total_poll_timeout }, + |m: &mut LongRunning| { &mut m.total_poll_timeout }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MethodSettings.LongRunning", + fields, + oneofs, + ) } - self.initial_poll_delay.as_mut().unwrap() - } - - // Take field - pub fn take_initial_poll_delay(&mut self) -> ::protobuf::well_known_types::Duration { - self.initial_poll_delay.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new()) } - // float poll_delay_multiplier = 2; - + impl ::protobuf::Message for LongRunning { + const NAME: &'static str = "LongRunning"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.initial_poll_delay)?; + }, + 21 => { + self.poll_delay_multiplier = is.read_float()?; + }, + 26 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.max_poll_delay)?; + }, + 34 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.total_poll_timeout)?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } - pub fn get_poll_delay_multiplier(&self) -> f32 { - self.poll_delay_multiplier - } - pub fn clear_poll_delay_multiplier(&mut self) { - self.poll_delay_multiplier = 0.; - } + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.initial_poll_delay.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if self.poll_delay_multiplier != 0. { + my_size += 1 + 4; + } + if let Some(v) = self.max_poll_delay.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + if let Some(v) = self.total_poll_timeout.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } - // Param is passed by value, moved - pub fn set_poll_delay_multiplier(&mut self, v: f32) { - self.poll_delay_multiplier = v; - } + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.initial_poll_delay.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + } + if self.poll_delay_multiplier != 0. { + os.write_float(2, self.poll_delay_multiplier)?; + } + if let Some(v) = self.max_poll_delay.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + } + if let Some(v) = self.total_poll_timeout.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } - // .google.protobuf.Duration max_poll_delay = 3; + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } - pub fn get_max_poll_delay(&self) -> &::protobuf::well_known_types::Duration { - self.max_poll_delay.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Duration as ::protobuf::Message>::default_instance()) - } - pub fn clear_max_poll_delay(&mut self) { - self.max_poll_delay.clear(); - } + fn new() -> LongRunning { + LongRunning::new() + } - pub fn has_max_poll_delay(&self) -> bool { - self.max_poll_delay.is_some() - } + fn clear(&mut self) { + self.initial_poll_delay.clear(); + self.poll_delay_multiplier = 0.; + self.max_poll_delay.clear(); + self.total_poll_timeout.clear(); + self.special_fields.clear(); + } - // Param is passed by value, moved - pub fn set_max_poll_delay(&mut self, v: ::protobuf::well_known_types::Duration) { - self.max_poll_delay = ::protobuf::SingularPtrField::some(v); + fn default_instance() -> &'static LongRunning { + static instance: LongRunning = LongRunning { + initial_poll_delay: ::protobuf::MessageField::none(), + poll_delay_multiplier: 0., + max_poll_delay: ::protobuf::MessageField::none(), + total_poll_timeout: ::protobuf::MessageField::none(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } } - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_max_poll_delay(&mut self) -> &mut ::protobuf::well_known_types::Duration { - if self.max_poll_delay.is_none() { - self.max_poll_delay.set_default(); + impl ::protobuf::MessageFull for LongRunning { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("MethodSettings.LongRunning").unwrap()).clone() } - self.max_poll_delay.as_mut().unwrap() } - // Take field - pub fn take_max_poll_delay(&mut self) -> ::protobuf::well_known_types::Duration { - self.max_poll_delay.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new()) + impl ::std::fmt::Display for LongRunning { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } - // .google.protobuf.Duration total_poll_timeout = 4; - - - pub fn get_total_poll_timeout(&self) -> &::protobuf::well_known_types::Duration { - self.total_poll_timeout.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Duration as ::protobuf::Message>::default_instance()) - } - pub fn clear_total_poll_timeout(&mut self) { - self.total_poll_timeout.clear(); + impl ::protobuf::reflect::ProtobufValue for LongRunning { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } +} - pub fn has_total_poll_timeout(&self) -> bool { - self.total_poll_timeout.is_some() - } +/// This message is used to configure the generation of a subset of the RPCs in +/// a service for client libraries. +// @@protoc_insertion_point(message:google.api.SelectiveGapicGeneration) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SelectiveGapicGeneration { + // message fields + /// An allowlist of the fully qualified names of RPCs that should be included + /// on public client surfaces. + // @@protoc_insertion_point(field:google.api.SelectiveGapicGeneration.methods) + pub methods: ::std::vec::Vec<::std::string::String>, + // special fields + // @@protoc_insertion_point(special_field:google.api.SelectiveGapicGeneration.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} - // Param is passed by value, moved - pub fn set_total_poll_timeout(&mut self, v: ::protobuf::well_known_types::Duration) { - self.total_poll_timeout = ::protobuf::SingularPtrField::some(v); +impl<'a> ::std::default::Default for &'a SelectiveGapicGeneration { + fn default() -> &'a SelectiveGapicGeneration { + ::default_instance() } +} - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_total_poll_timeout(&mut self) -> &mut ::protobuf::well_known_types::Duration { - if self.total_poll_timeout.is_none() { - self.total_poll_timeout.set_default(); - } - self.total_poll_timeout.as_mut().unwrap() +impl SelectiveGapicGeneration { + pub fn new() -> SelectiveGapicGeneration { + ::std::default::Default::default() } - // Take field - pub fn take_total_poll_timeout(&mut self) -> ::protobuf::well_known_types::Duration { - self.total_poll_timeout.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "methods", + |m: &SelectiveGapicGeneration| { &m.methods }, + |m: &mut SelectiveGapicGeneration| { &mut m.methods }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "SelectiveGapicGeneration", + fields, + oneofs, + ) } } -impl ::protobuf::Message for MethodSettings_LongRunning { +impl ::protobuf::Message for SelectiveGapicGeneration { + const NAME: &'static str = "SelectiveGapicGeneration"; + fn is_initialized(&self) -> bool { - for v in &self.initial_poll_delay { - if !v.is_initialized() { - return false; - } - }; - for v in &self.max_poll_delay { - if !v.is_initialized() { - return false; - } - }; - for v in &self.total_poll_timeout { - 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_message_into(wire_type, is, &mut self.initial_poll_delay)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed32 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_float()?; - self.poll_delay_multiplier = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.max_poll_delay)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.methods.push(is.read_string()?); }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.total_poll_timeout)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -3515,154 +2615,93 @@ impl ::protobuf::Message for MethodSettings_LongRunning { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.initial_poll_delay.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.poll_delay_multiplier != 0. { - my_size += 5; - } - if let Some(ref v) = self.max_poll_delay.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.total_poll_timeout.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); + for value in &self.methods { + my_size += ::protobuf::rt::string_size(1, &value); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.initial_poll_delay.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.poll_delay_multiplier != 0. { - os.write_float(2, self.poll_delay_multiplier)?; - } - if let Some(ref v) = self.max_poll_delay.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 let Some(ref v) = self.total_poll_timeout.as_ref() { - 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())?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + for v in &self.methods { + os.write_string(1, &v)?; + }; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } - fn new() -> MethodSettings_LongRunning { - MethodSettings_LongRunning::new() + fn new() -> SelectiveGapicGeneration { + SelectiveGapicGeneration::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>( - "initial_poll_delay", - |m: &MethodSettings_LongRunning| { &m.initial_poll_delay }, - |m: &mut MethodSettings_LongRunning| { &mut m.initial_poll_delay }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>( - "poll_delay_multiplier", - |m: &MethodSettings_LongRunning| { &m.poll_delay_multiplier }, - |m: &mut MethodSettings_LongRunning| { &mut m.poll_delay_multiplier }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>( - "max_poll_delay", - |m: &MethodSettings_LongRunning| { &m.max_poll_delay }, - |m: &mut MethodSettings_LongRunning| { &mut m.max_poll_delay }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>( - "total_poll_timeout", - |m: &MethodSettings_LongRunning| { &m.total_poll_timeout }, - |m: &mut MethodSettings_LongRunning| { &mut m.total_poll_timeout }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MethodSettings.LongRunning", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.methods.clear(); + self.special_fields.clear(); } - fn default_instance() -> &'static MethodSettings_LongRunning { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MethodSettings_LongRunning::new) + fn default_instance() -> &'static SelectiveGapicGeneration { + static instance: SelectiveGapicGeneration = SelectiveGapicGeneration { + methods: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for MethodSettings_LongRunning { - fn clear(&mut self) { - self.initial_poll_delay.clear(); - self.poll_delay_multiplier = 0.; - self.max_poll_delay.clear(); - self.total_poll_timeout.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for SelectiveGapicGeneration { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("SelectiveGapicGeneration").unwrap()).clone() } } -impl ::std::fmt::Debug for MethodSettings_LongRunning { +impl ::std::fmt::Display for SelectiveGapicGeneration { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } -impl ::protobuf::reflect::ProtobufValue for MethodSettings_LongRunning { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } +impl ::protobuf::reflect::ProtobufValue for SelectiveGapicGeneration { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +/// The organization for which the client libraries are being published. +/// Affects the url where generated docs are published, etc. +#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] +// @@protoc_insertion_point(enum:google.api.ClientLibraryOrganization) pub enum ClientLibraryOrganization { + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryOrganization.CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED) CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryOrganization.CLOUD) CLOUD = 1, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryOrganization.ADS) ADS = 2, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryOrganization.PHOTOS) PHOTOS = 3, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryOrganization.STREET_VIEW) STREET_VIEW = 4, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryOrganization.SHOPPING) SHOPPING = 5, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryOrganization.GEO) GEO = 6, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryOrganization.GENERATIVE_AI) GENERATIVE_AI = 7, } -impl ::protobuf::ProtobufEnum for ClientLibraryOrganization { +impl ::protobuf::Enum for ClientLibraryOrganization { + const NAME: &'static str = "ClientLibraryOrganization"; + fn value(&self) -> i32 { *self as i32 } @@ -3681,29 +2720,42 @@ impl ::protobuf::ProtobufEnum for ClientLibraryOrganization { } } - fn values() -> &'static [Self] { - static values: &'static [ClientLibraryOrganization] = &[ - ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED, - ClientLibraryOrganization::CLOUD, - ClientLibraryOrganization::ADS, - ClientLibraryOrganization::PHOTOS, - ClientLibraryOrganization::STREET_VIEW, - ClientLibraryOrganization::SHOPPING, - ClientLibraryOrganization::GEO, - ClientLibraryOrganization::GENERATIVE_AI, - ]; - values + fn from_str(str: &str) -> ::std::option::Option { + match str { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" => ::std::option::Option::Some(ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED), + "CLOUD" => ::std::option::Option::Some(ClientLibraryOrganization::CLOUD), + "ADS" => ::std::option::Option::Some(ClientLibraryOrganization::ADS), + "PHOTOS" => ::std::option::Option::Some(ClientLibraryOrganization::PHOTOS), + "STREET_VIEW" => ::std::option::Option::Some(ClientLibraryOrganization::STREET_VIEW), + "SHOPPING" => ::std::option::Option::Some(ClientLibraryOrganization::SHOPPING), + "GEO" => ::std::option::Option::Some(ClientLibraryOrganization::GEO), + "GENERATIVE_AI" => ::std::option::Option::Some(ClientLibraryOrganization::GENERATIVE_AI), + _ => ::std::option::Option::None + } } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ClientLibraryOrganization", file_descriptor_proto()) - }) - } + const VALUES: &'static [ClientLibraryOrganization] = &[ + ClientLibraryOrganization::CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED, + ClientLibraryOrganization::CLOUD, + ClientLibraryOrganization::ADS, + ClientLibraryOrganization::PHOTOS, + ClientLibraryOrganization::STREET_VIEW, + ClientLibraryOrganization::SHOPPING, + ClientLibraryOrganization::GEO, + ClientLibraryOrganization::GENERATIVE_AI, + ]; } -impl ::std::marker::Copy for ClientLibraryOrganization { +impl ::protobuf::EnumFull for ClientLibraryOrganization { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().enum_by_package_relative_name("ClientLibraryOrganization").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } } impl ::std::default::Default for ClientLibraryOrganization { @@ -3712,20 +2764,27 @@ impl ::std::default::Default for ClientLibraryOrganization { } } -impl ::protobuf::reflect::ProtobufValue for ClientLibraryOrganization { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) +impl ClientLibraryOrganization { + fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ClientLibraryOrganization") } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +/// To where should client libraries be published? +#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] +// @@protoc_insertion_point(enum:google.api.ClientLibraryDestination) pub enum ClientLibraryDestination { + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryDestination.CLIENT_LIBRARY_DESTINATION_UNSPECIFIED) CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryDestination.GITHUB) GITHUB = 10, + // @@protoc_insertion_point(enum_value:google.api.ClientLibraryDestination.PACKAGE_MANAGER) PACKAGE_MANAGER = 20, } -impl ::protobuf::ProtobufEnum for ClientLibraryDestination { +impl ::protobuf::Enum for ClientLibraryDestination { + const NAME: &'static str = "ClientLibraryDestination"; + fn value(&self) -> i32 { *self as i32 } @@ -3739,24 +2798,36 @@ impl ::protobuf::ProtobufEnum for ClientLibraryDestination { } } - fn values() -> &'static [Self] { - static values: &'static [ClientLibraryDestination] = &[ - ClientLibraryDestination::CLIENT_LIBRARY_DESTINATION_UNSPECIFIED, - ClientLibraryDestination::GITHUB, - ClientLibraryDestination::PACKAGE_MANAGER, - ]; - values + fn from_str(str: &str) -> ::std::option::Option { + match str { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" => ::std::option::Option::Some(ClientLibraryDestination::CLIENT_LIBRARY_DESTINATION_UNSPECIFIED), + "GITHUB" => ::std::option::Option::Some(ClientLibraryDestination::GITHUB), + "PACKAGE_MANAGER" => ::std::option::Option::Some(ClientLibraryDestination::PACKAGE_MANAGER), + _ => ::std::option::Option::None + } } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ClientLibraryDestination", file_descriptor_proto()) - }) - } + const VALUES: &'static [ClientLibraryDestination] = &[ + ClientLibraryDestination::CLIENT_LIBRARY_DESTINATION_UNSPECIFIED, + ClientLibraryDestination::GITHUB, + ClientLibraryDestination::PACKAGE_MANAGER, + ]; } -impl ::std::marker::Copy for ClientLibraryDestination { +impl ::protobuf::EnumFull for ClientLibraryDestination { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().enum_by_package_relative_name("ClientLibraryDestination").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = match self { + ClientLibraryDestination::CLIENT_LIBRARY_DESTINATION_UNSPECIFIED => 0, + ClientLibraryDestination::GITHUB => 1, + ClientLibraryDestination::PACKAGE_MANAGER => 2, + }; + Self::enum_descriptor().value_by_index(index) + } } impl ::std::default::Default for ClientLibraryDestination { @@ -3765,54 +2836,59 @@ impl ::std::default::Default for ClientLibraryDestination { } } -impl ::protobuf::reflect::ProtobufValue for ClientLibraryDestination { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) +impl ClientLibraryDestination { + fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ClientLibraryDestination") } } /// Extension fields pub mod exts { - pub const method_signature: ::protobuf::ext::ExtFieldRepeated<::protobuf::descriptor::MethodOptions, ::protobuf::types::ProtobufTypeString> = ::protobuf::ext::ExtFieldRepeated { field_number: 1051, phantom: ::std::marker::PhantomData }; + pub const method_signature: ::protobuf::ext::ExtFieldRepeated<::protobuf::descriptor::MethodOptions, ::std::string::String> = ::protobuf::ext::ExtFieldRepeated::new(1051, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - pub const default_host: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::ServiceOptions, ::protobuf::types::ProtobufTypeString> = ::protobuf::ext::ExtFieldOptional { field_number: 1049, phantom: ::std::marker::PhantomData }; + pub const default_host: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::ServiceOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1049, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - pub const oauth_scopes: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::ServiceOptions, ::protobuf::types::ProtobufTypeString> = ::protobuf::ext::ExtFieldOptional { field_number: 1050, phantom: ::std::marker::PhantomData }; + pub const oauth_scopes: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::ServiceOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1050, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); + + pub const api_version: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::ServiceOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(525000001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x17google/api/client.proto\x12\ngoogle.api\x1a\x1dgoogle/api/launch_s\ tage.proto\x1a\x20google/protobuf/descriptor.proto\x1a\x1egoogle/protobu\ - f/duration.proto\"\x94\x01\n\x16CommonLanguageSettings\x120\n\x12referen\ + f/duration.proto\"\xf8\x01\n\x16CommonLanguageSettings\x120\n\x12referen\ ce_docs_uri\x18\x01\x20\x01(\tR\x10referenceDocsUriB\x02\x18\x01\x12H\n\ \x0cdestinations\x18\x02\x20\x03(\x0e2$.google.api.ClientLibraryDestinat\ - ionR\x0cdestinations\"\x93\x05\n\x15ClientLibrarySettings\x12\x18\n\x07v\ - ersion\x18\x01\x20\x01(\tR\x07version\x12:\n\x0claunch_stage\x18\x02\x20\ - \x01(\x0e2\x17.google.api.LaunchStageR\x0blaunchStage\x12,\n\x12rest_num\ - eric_enums\x18\x03\x20\x01(\x08R\x10restNumericEnums\x12=\n\rjava_settin\ - gs\x18\x15\x20\x01(\x0b2\x18.google.api.JavaSettingsR\x0cjavaSettings\ - \x12:\n\x0ccpp_settings\x18\x16\x20\x01(\x0b2\x17.google.api.CppSettings\ - R\x0bcppSettings\x12:\n\x0cphp_settings\x18\x17\x20\x01(\x0b2\x17.google\ - .api.PhpSettingsR\x0bphpSettings\x12C\n\x0fpython_settings\x18\x18\x20\ - \x01(\x0b2\x1a.google.api.PythonSettingsR\x0epythonSettings\x12=\n\rnode\ - _settings\x18\x19\x20\x01(\x0b2\x18.google.api.NodeSettingsR\x0cnodeSett\ - ings\x12C\n\x0fdotnet_settings\x18\x1a\x20\x01(\x0b2\x1a.google.api.Dotn\ - etSettingsR\x0edotnetSettings\x12=\n\rruby_settings\x18\x1b\x20\x01(\x0b\ - 2\x18.google.api.RubySettingsR\x0crubySettings\x127\n\x0bgo_settings\x18\ - \x1c\x20\x01(\x0b2\x16.google.api.GoSettingsR\ngoSettings\"\xab\x04\n\nP\ - ublishing\x12C\n\x0fmethod_settings\x18\x02\x20\x03(\x0b2\x1a.google.api\ - .MethodSettingsR\x0emethodSettings\x12\"\n\rnew_issue_uri\x18e\x20\x01(\ - \tR\x0bnewIssueUri\x12+\n\x11documentation_uri\x18f\x20\x01(\tR\x10docum\ - entationUri\x12$\n\x0eapi_short_name\x18g\x20\x01(\tR\x0capiShortName\ - \x12!\n\x0cgithub_label\x18h\x20\x01(\tR\x0bgithubLabel\x124\n\x16codeow\ - ner_github_teams\x18i\x20\x03(\tR\x14codeownerGithubTeams\x12$\n\x0edoc_\ - tag_prefix\x18j\x20\x01(\tR\x0cdocTagPrefix\x12I\n\x0corganization\x18k\ - \x20\x01(\x0e2%.google.api.ClientLibraryOrganizationR\x0corganization\ - \x12L\n\x10library_settings\x18m\x20\x03(\x0b2!.google.api.ClientLibrary\ - SettingsR\x0flibrarySettings\x12I\n!proto_reference_documentation_uri\ - \x18n\x20\x01(\tR\x1eprotoReferenceDocumentationUri\"\x9a\x02\n\x0cJavaS\ - ettings\x12'\n\x0flibrary_package\x18\x01\x20\x01(\tR\x0elibraryPackage\ + ionR\x0cdestinations\x12b\n\x1aselective_gapic_generation\x18\x03\x20\ + \x01(\x0b2$.google.api.SelectiveGapicGenerationR\x18selectiveGapicGenera\ + tion\"\x93\x05\n\x15ClientLibrarySettings\x12\x18\n\x07version\x18\x01\ + \x20\x01(\tR\x07version\x12:\n\x0claunch_stage\x18\x02\x20\x01(\x0e2\x17\ + .google.api.LaunchStageR\x0blaunchStage\x12,\n\x12rest_numeric_enums\x18\ + \x03\x20\x01(\x08R\x10restNumericEnums\x12=\n\rjava_settings\x18\x15\x20\ + \x01(\x0b2\x18.google.api.JavaSettingsR\x0cjavaSettings\x12:\n\x0ccpp_se\ + ttings\x18\x16\x20\x01(\x0b2\x17.google.api.CppSettingsR\x0bcppSettings\ + \x12:\n\x0cphp_settings\x18\x17\x20\x01(\x0b2\x17.google.api.PhpSettings\ + R\x0bphpSettings\x12C\n\x0fpython_settings\x18\x18\x20\x01(\x0b2\x1a.goo\ + gle.api.PythonSettingsR\x0epythonSettings\x12=\n\rnode_settings\x18\x19\ + \x20\x01(\x0b2\x18.google.api.NodeSettingsR\x0cnodeSettings\x12C\n\x0fdo\ + tnet_settings\x18\x1a\x20\x01(\x0b2\x1a.google.api.DotnetSettingsR\x0edo\ + tnetSettings\x12=\n\rruby_settings\x18\x1b\x20\x01(\x0b2\x18.google.api.\ + RubySettingsR\x0crubySettings\x127\n\x0bgo_settings\x18\x1c\x20\x01(\x0b\ + 2\x16.google.api.GoSettingsR\ngoSettings\"\xf4\x04\n\nPublishing\x12C\n\ + \x0fmethod_settings\x18\x02\x20\x03(\x0b2\x1a.google.api.MethodSettingsR\ + \x0emethodSettings\x12\"\n\rnew_issue_uri\x18e\x20\x01(\tR\x0bnewIssueUr\ + i\x12+\n\x11documentation_uri\x18f\x20\x01(\tR\x10documentationUri\x12$\ + \n\x0eapi_short_name\x18g\x20\x01(\tR\x0capiShortName\x12!\n\x0cgithub_l\ + abel\x18h\x20\x01(\tR\x0bgithubLabel\x124\n\x16codeowner_github_teams\ + \x18i\x20\x03(\tR\x14codeownerGithubTeams\x12$\n\x0edoc_tag_prefix\x18j\ + \x20\x01(\tR\x0cdocTagPrefix\x12I\n\x0corganization\x18k\x20\x01(\x0e2%.\ + google.api.ClientLibraryOrganizationR\x0corganization\x12L\n\x10library_\ + settings\x18m\x20\x03(\x0b2!.google.api.ClientLibrarySettingsR\x0flibrar\ + ySettings\x12I\n!proto_reference_documentation_uri\x18n\x20\x01(\tR\x1ep\ + rotoReferenceDocumentationUri\x12G\n\x20rest_reference_documentation_uri\ + \x18o\x20\x01(\tR\x1drestReferenceDocumentationUri\"\x9a\x02\n\x0cJavaSe\ + ttings\x12'\n\x0flibrary_package\x18\x01\x20\x01(\tR\x0elibraryPackage\ \x12_\n\x13service_class_names\x18\x02\x20\x03(\x0b2/.google.api.JavaSet\ tings.ServiceClassNamesEntryR\x11serviceClassNames\x12:\n\x06common\x18\ \x03\x20\x01(\x0b2\".google.api.CommonLanguageSettingsR\x06common\x1aD\n\ @@ -3820,450 +2896,561 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"I\n\x0bCppSe\ ttings\x12:\n\x06common\x18\x01\x20\x01(\x0b2\".google.api.CommonLanguag\ eSettingsR\x06common\"I\n\x0bPhpSettings\x12:\n\x06common\x18\x01\x20\ - \x01(\x0b2\".google.api.CommonLanguageSettingsR\x06common\"L\n\x0ePython\ - Settings\x12:\n\x06common\x18\x01\x20\x01(\x0b2\".google.api.CommonLangu\ - ageSettingsR\x06common\"J\n\x0cNodeSettings\x12:\n\x06common\x18\x01\x20\ - \x01(\x0b2\".google.api.CommonLanguageSettingsR\x06common\"\xae\x04\n\ - \x0eDotnetSettings\x12:\n\x06common\x18\x01\x20\x01(\x0b2\".google.api.C\ - ommonLanguageSettingsR\x06common\x12Z\n\x10renamed_services\x18\x02\x20\ - \x03(\x0b2/.google.api.DotnetSettings.RenamedServicesEntryR\x0frenamedSe\ - rvices\x12]\n\x11renamed_resources\x18\x03\x20\x03(\x0b20.google.api.Dot\ - netSettings.RenamedResourcesEntryR\x10renamedResources\x12+\n\x11ignored\ - _resources\x18\x04\x20\x03(\tR\x10ignoredResources\x128\n\x18forced_name\ - space_aliases\x18\x05\x20\x03(\tR\x16forcedNamespaceAliases\x125\n\x16ha\ - ndwritten_signatures\x18\x06\x20\x03(\tR\x15handwrittenSignatures\x1aB\n\ - \x14RenamedServicesEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\ - \x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\x1aC\n\x15Renamed\ - ResourcesEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05\ - value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"J\n\x0cRubySettings\x12:\n\ - \x06common\x18\x01\x20\x01(\x0b2\".google.api.CommonLanguageSettingsR\ - \x06common\"H\n\nGoSettings\x12:\n\x06common\x18\x01\x20\x01(\x0b2\".goo\ - gle.api.CommonLanguageSettingsR\x06common\"\x8e\x03\n\x0eMethodSettings\ - \x12\x1a\n\x08selector\x18\x01\x20\x01(\tR\x08selector\x12I\n\x0clong_ru\ - nning\x18\x02\x20\x01(\x0b2&.google.api.MethodSettings.LongRunningR\x0bl\ - ongRunning\x1a\x94\x02\n\x0bLongRunning\x12G\n\x12initial_poll_delay\x18\ - \x01\x20\x01(\x0b2\x19.google.protobuf.DurationR\x10initialPollDelay\x12\ - 2\n\x15poll_delay_multiplier\x18\x02\x20\x01(\x02R\x13pollDelayMultiplie\ - r\x12?\n\x0emax_poll_delay\x18\x03\x20\x01(\x0b2\x19.google.protobuf.Dur\ - ationR\x0cmaxPollDelay\x12G\n\x12total_poll_timeout\x18\x04\x20\x01(\x0b\ - 2\x19.google.protobuf.DurationR\x10totalPollTimeout*\xa3\x01\n\x19Client\ - LibraryOrganization\x12+\n'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED\x10\0\ - \x12\t\n\x05CLOUD\x10\x01\x12\x07\n\x03ADS\x10\x02\x12\n\n\x06PHOTOS\x10\ - \x03\x12\x0f\n\x0bSTREET_VIEW\x10\x04\x12\x0c\n\x08SHOPPING\x10\x05\x12\ - \x07\n\x03GEO\x10\x06\x12\x11\n\rGENERATIVE_AI\x10\x07*g\n\x18ClientLibr\ - aryDestination\x12*\n&CLIENT_LIBRARY_DESTINATION_UNSPECIFIED\x10\0\x12\n\ - \n\x06GITHUB\x10\n\x12\x13\n\x0fPACKAGE_MANAGER\x10\x14:J\n\x10method_si\ - gnature\x18\x9b\x08\x20\x03(\t\x12\x1e.google.protobuf.MethodOptionsR\ - \x0fmethodSignature:C\n\x0cdefault_host\x18\x99\x08\x20\x01(\t\x12\x1f.g\ - oogle.protobuf.ServiceOptionsR\x0bdefaultHost:C\n\x0coauth_scopes\x18\ - \x9a\x08\x20\x01(\t\x12\x1f.google.protobuf.ServiceOptionsR\x0boauthScop\ - esBi\n\x0ecom.google.apiB\x0bClientProtoP\x01ZAgoogle.golang.org/genprot\ - o/googleapis/api/annotations;annotations\xa2\x02\x04GAPIJ\xa4j\n\x07\x12\ - \x05\x0e\0\x89\x03\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\ - \x20Copyright\x202023\x20Google\x20LLC\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\x13\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\ - \0X\n\t\n\x02\x08\x0b\x12\x03\x16\0X\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\0\"\n\t\n\x02\x08$\x12\x03\ - \x1a\0\"\n\t\n\x01\x07\x12\x04\x1c\0A\x01\n\x85\x0b\n\x02\x07\0\x12\x03@\ - \x02*\x1a\xf9\n\x20A\x20definition\x20of\x20a\x20client\x20library\x20me\ - thod\x20signature.\n\n\x20In\x20client\x20libraries,\x20each\x20proto\ - \x20RPC\x20corresponds\x20to\x20one\x20or\x20more\x20methods\n\x20which\ - \x20the\x20end\x20user\x20is\x20able\x20to\x20call,\x20and\x20calls\x20t\ - he\x20underlying\x20RPC.\n\x20Normally,\x20this\x20method\x20receives\ - \x20a\x20single\x20argument\x20(a\x20struct\x20or\x20instance\n\x20corre\ - sponding\x20to\x20the\x20RPC\x20request\x20object).\x20Defining\x20this\ - \x20field\x20will\n\x20add\x20one\x20or\x20more\x20overloads\x20providin\ - g\x20flattened\x20or\x20simpler\x20method\x20signatures\n\x20in\x20some\ - \x20languages.\n\n\x20The\x20fields\x20on\x20the\x20method\x20signature\ - \x20are\x20provided\x20as\x20a\x20comma-separated\n\x20string.\n\n\x20Fo\ - r\x20example,\x20the\x20proto\x20RPC\x20and\x20annotation:\n\n\x20\x20\ - \x20rpc\x20CreateSubscription(CreateSubscriptionRequest)\n\x20\x20\x20\ - \x20\x20\x20\x20returns\x20(Subscription)\x20{\n\x20\x20\x20\x20\x20opti\ - on\x20(google.api.method_signature)\x20=\x20\"name,topic\";\n\x20\x20\ - \x20}\n\n\x20Would\x20add\x20the\x20following\x20Java\x20overload\x20(in\ - \x20addition\x20to\x20the\x20method\x20accepting\n\x20the\x20request\x20\ - object):\n\n\x20\x20\x20public\x20final\x20Subscription\x20createSubscri\ - ption(String\x20name,\x20String\x20topic)\n\n\x20The\x20following\x20bac\ - kwards-compatibility\x20guidelines\x20apply:\n\n\x20\x20\x20*\x20Adding\ - \x20this\x20annotation\x20to\x20an\x20unannotated\x20method\x20is\x20bac\ - kwards\n\x20\x20\x20\x20\x20compatible.\n\x20\x20\x20*\x20Adding\x20this\ - \x20annotation\x20to\x20a\x20method\x20which\x20already\x20has\x20existi\ - ng\n\x20\x20\x20\x20\x20method\x20signature\x20annotations\x20is\x20back\ - wards\x20compatible\x20if\x20and\x20only\x20if\n\x20\x20\x20\x20\x20the\ - \x20new\x20method\x20signature\x20annotation\x20is\x20last\x20in\x20the\ - \x20sequence.\n\x20\x20\x20*\x20Modifying\x20or\x20removing\x20an\x20exi\ - sting\x20method\x20signature\x20annotation\x20is\n\x20\x20\x20\x20\x20a\ - \x20breaking\x20change.\n\x20\x20\x20*\x20Re-ordering\x20existing\x20met\ - hod\x20signature\x20annotations\x20is\x20a\x20breaking\n\x20\x20\x20\x20\ - \x20change.\n\n\n\n\x03\x07\0\x02\x12\x03\x1c\x07$\n\n\n\x03\x07\0\x04\ - \x12\x03@\x02\n\n\n\n\x03\x07\0\x05\x12\x03@\x0b\x11\n\n\n\x03\x07\0\x01\ - \x12\x03@\x12\"\n\n\n\x03\x07\0\x03\x12\x03@%)\n\t\n\x01\x07\x12\x04C\0d\ - \x01\n\xca\x01\n\x02\x07\x01\x12\x03M\x02\x1d\x1a\xbe\x01\x20The\x20host\ - name\x20for\x20this\x20service.\n\x20This\x20should\x20be\x20specified\ - \x20with\x20no\x20prefix\x20or\x20protocol.\n\n\x20Example:\n\n\x20\x20\ - \x20service\x20Foo\x20{\n\x20\x20\x20\x20\x20option\x20(google.api.defau\ - lt_host)\x20=\x20\"foo.googleapi.com\";\n\x20\x20\x20\x20\x20...\n\x20\ - \x20\x20}\n\n\n\n\x03\x07\x01\x02\x12\x03C\x07%\n\n\n\x03\x07\x01\x05\ - \x12\x03M\x02\x08\n\n\n\x03\x07\x01\x01\x12\x03M\t\x15\n\n\n\x03\x07\x01\ - \x03\x12\x03M\x18\x1c\n\xc3\x03\n\x02\x07\x02\x12\x03c\x02\x1d\x1a\xb7\ - \x03\x20OAuth\x20scopes\x20needed\x20for\x20the\x20client.\n\n\x20Exampl\ - e:\n\n\x20\x20\x20service\x20Foo\x20{\n\x20\x20\x20\x20\x20option\x20(go\ - ogle.api.oauth_scopes)\x20=\x20\\\n\x20\x20\x20\x20\x20\x20\x20\"https:/\ - /www.googleapis.com/auth/cloud-platform\";\n\x20\x20\x20\x20\x20...\n\ - \x20\x20\x20}\n\n\x20If\x20there\x20is\x20more\x20than\x20one\x20scope,\ - \x20use\x20a\x20comma-separated\x20string:\n\n\x20Example:\n\n\x20\x20\ - \x20service\x20Foo\x20{\n\x20\x20\x20\x20\x20option\x20(google.api.oauth\ - _scopes)\x20=\x20\\\n\x20\x20\x20\x20\x20\x20\x20\"https://www.googleapi\ - s.com/auth/cloud-platform,\"\n\x20\x20\x20\x20\x20\x20\x20\"https://www.\ - googleapis.com/auth/monitoring\";\n\x20\x20\x20\x20\x20...\n\x20\x20\x20\ - }\n\n\n\n\x03\x07\x02\x02\x12\x03C\x07%\n\n\n\x03\x07\x02\x05\x12\x03c\ - \x02\x08\n\n\n\x03\x07\x02\x01\x12\x03c\t\x15\n\n\n\x03\x07\x02\x03\x12\ - \x03c\x18\x1c\n6\n\x02\x04\0\x12\x04g\0n\x01\x1a*\x20Required\x20informa\ - tion\x20for\x20every\x20language.\n\n\n\n\x03\x04\0\x01\x12\x03g\x08\x1e\ - \n\x8f\x01\n\x04\x04\0\x02\0\x12\x03j\x024\x1a\x81\x01\x20Link\x20to\x20\ - automatically\x20generated\x20reference\x20documentation.\x20\x20Example\ - :\n\x20https://cloud.google.com/nodejs/docs/reference/asset/latest\n\n\ - \x0c\n\x05\x04\0\x02\0\x05\x12\x03j\x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\ - \x12\x03j\t\x1b\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03j\x1e\x1f\n\x0c\n\x05\ - \x04\0\x02\0\x08\x12\x03j\x203\n\r\n\x06\x04\0\x02\0\x08\x03\x12\x03j!2\ - \nX\n\x04\x04\0\x02\x01\x12\x03m\x025\x1aK\x20The\x20destination\x20wher\ - e\x20API\x20teams\x20want\x20this\x20client\x20library\x20to\x20be\x20pu\ - blished.\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03m\x02\n\n\x0c\n\x05\x04\ - \0\x02\x01\x06\x12\x03m\x0b#\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03m$0\n\ - \x0c\n\x05\x04\0\x02\x01\x03\x12\x03m34\nG\n\x02\x04\x01\x12\x05q\0\x95\ - \x01\x01\x1a:\x20Details\x20about\x20how\x20and\x20where\x20to\x20publis\ - h\x20client\x20libraries.\n\n\n\n\x03\x04\x01\x01\x12\x03q\x08\x1d\n\xd9\ - \x01\n\x04\x04\x01\x02\0\x12\x03u\x02\x15\x1a\xcb\x01\x20Version\x20of\ - \x20the\x20API\x20to\x20apply\x20these\x20settings\x20to.\x20This\x20is\ - \x20the\x20full\x20protobuf\n\x20package\x20for\x20the\x20API,\x20ending\ - \x20in\x20the\x20version\x20element.\n\x20Examples:\x20\"google.cloud.sp\ - eech.v1\"\x20and\x20\"google.spanner.admin.database.v1\".\n\n\x0c\n\x05\ - \x04\x01\x02\0\x05\x12\x03u\x02\x08\n\x0c\n\x05\x04\x01\x02\0\x01\x12\ - \x03u\t\x10\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03u\x13\x14\n7\n\x04\x04\ - \x01\x02\x01\x12\x03x\x02\x1f\x1a*\x20Launch\x20stage\x20of\x20this\x20v\ - ersion\x20of\x20the\x20API.\n\n\x0c\n\x05\x04\x01\x02\x01\x06\x12\x03x\ - \x02\r\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03x\x0e\x1a\n\x0c\n\x05\x04\ - \x01\x02\x01\x03\x12\x03x\x1d\x1e\no\n\x04\x04\x01\x02\x02\x12\x03|\x02\ - \x1e\x1ab\x20When\x20using\x20transport=rest,\x20the\x20client\x20reques\ - t\x20will\x20encode\x20enums\x20as\n\x20numbers\x20rather\x20than\x20str\ - ings.\n\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03|\x02\x06\n\x0c\n\x05\x04\ - \x01\x02\x02\x01\x12\x03|\x07\x19\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\ - \x03|\x1c\x1d\nP\n\x04\x04\x01\x02\x03\x12\x03\x7f\x02\"\x1aC\x20Setting\ - s\x20for\x20legacy\x20Java\x20features,\x20supported\x20in\x20the\x20Ser\ - vice\x20YAML.\n\n\x0c\n\x05\x04\x01\x02\x03\x06\x12\x03\x7f\x02\x0e\n\ - \x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x7f\x0f\x1c\n\x0c\n\x05\x04\x01\ - \x02\x03\x03\x12\x03\x7f\x1f!\n2\n\x04\x04\x01\x02\x04\x12\x04\x82\x01\ + \x01(\x0b2\".google.api.CommonLanguageSettingsR\x06common\"\xfd\x01\n\ + \x0ePythonSettings\x12:\n\x06common\x18\x01\x20\x01(\x0b2\".google.api.C\ + ommonLanguageSettingsR\x06common\x12d\n\x15experimental_features\x18\x02\ + \x20\x01(\x0b2/.google.api.PythonSettings.ExperimentalFeaturesR\x14exper\ + imentalFeatures\x1aI\n\x14ExperimentalFeatures\x121\n\x15rest_async_io_e\ + nabled\x18\x01\x20\x01(\x08R\x12restAsyncIoEnabled\"J\n\x0cNodeSettings\ + \x12:\n\x06common\x18\x01\x20\x01(\x0b2\".google.api.CommonLanguageSetti\ + ngsR\x06common\"\xae\x04\n\x0eDotnetSettings\x12:\n\x06common\x18\x01\ + \x20\x01(\x0b2\".google.api.CommonLanguageSettingsR\x06common\x12Z\n\x10\ + renamed_services\x18\x02\x20\x03(\x0b2/.google.api.DotnetSettings.Rename\ + dServicesEntryR\x0frenamedServices\x12]\n\x11renamed_resources\x18\x03\ + \x20\x03(\x0b20.google.api.DotnetSettings.RenamedResourcesEntryR\x10rena\ + medResources\x12+\n\x11ignored_resources\x18\x04\x20\x03(\tR\x10ignoredR\ + esources\x128\n\x18forced_namespace_aliases\x18\x05\x20\x03(\tR\x16force\ + dNamespaceAliases\x125\n\x16handwritten_signatures\x18\x06\x20\x03(\tR\ + \x15handwrittenSignatures\x1aB\n\x14RenamedServicesEntry\x12\x10\n\x03ke\ + y\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05v\ + alue:\x028\x01\x1aC\n\x15RenamedResourcesEntry\x12\x10\n\x03key\x18\x01\ + \x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x02\ + 8\x01\"J\n\x0cRubySettings\x12:\n\x06common\x18\x01\x20\x01(\x0b2\".goog\ + le.api.CommonLanguageSettingsR\x06common\"H\n\nGoSettings\x12:\n\x06comm\ + on\x18\x01\x20\x01(\x0b2\".google.api.CommonLanguageSettingsR\x06common\ + \"\xc2\x03\n\x0eMethodSettings\x12\x1a\n\x08selector\x18\x01\x20\x01(\tR\ + \x08selector\x12I\n\x0clong_running\x18\x02\x20\x01(\x0b2&.google.api.Me\ + thodSettings.LongRunningR\x0blongRunning\x122\n\x15auto_populated_fields\ + \x18\x03\x20\x03(\tR\x13autoPopulatedFields\x1a\x94\x02\n\x0bLongRunning\ + \x12G\n\x12initial_poll_delay\x18\x01\x20\x01(\x0b2\x19.google.protobuf.\ + DurationR\x10initialPollDelay\x122\n\x15poll_delay_multiplier\x18\x02\ + \x20\x01(\x02R\x13pollDelayMultiplier\x12?\n\x0emax_poll_delay\x18\x03\ + \x20\x01(\x0b2\x19.google.protobuf.DurationR\x0cmaxPollDelay\x12G\n\x12t\ + otal_poll_timeout\x18\x04\x20\x01(\x0b2\x19.google.protobuf.DurationR\ + \x10totalPollTimeout\"4\n\x18SelectiveGapicGeneration\x12\x18\n\x07metho\ + ds\x18\x01\x20\x03(\tR\x07methods*\xa3\x01\n\x19ClientLibraryOrganizatio\ + n\x12+\n'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED\x10\0\x12\t\n\x05CLOUD\ + \x10\x01\x12\x07\n\x03ADS\x10\x02\x12\n\n\x06PHOTOS\x10\x03\x12\x0f\n\ + \x0bSTREET_VIEW\x10\x04\x12\x0c\n\x08SHOPPING\x10\x05\x12\x07\n\x03GEO\ + \x10\x06\x12\x11\n\rGENERATIVE_AI\x10\x07*g\n\x18ClientLibraryDestinatio\ + n\x12*\n&CLIENT_LIBRARY_DESTINATION_UNSPECIFIED\x10\0\x12\n\n\x06GITHUB\ + \x10\n\x12\x13\n\x0fPACKAGE_MANAGER\x10\x14:J\n\x10method_signature\x18\ + \x9b\x08\x20\x03(\t\x12\x1e.google.protobuf.MethodOptionsR\x0fmethodSign\ + ature:C\n\x0cdefault_host\x18\x99\x08\x20\x01(\t\x12\x1f.google.protobuf\ + .ServiceOptionsR\x0bdefaultHost:C\n\x0coauth_scopes\x18\x9a\x08\x20\x01(\ + \t\x12\x1f.google.protobuf.ServiceOptionsR\x0boauthScopes:D\n\x0bapi_ver\ + sion\x18\xc1\xba\xab\xfa\x01\x20\x01(\t\x12\x1f.google.protobuf.ServiceO\ + ptionsR\napiVersionBi\n\x0ecom.google.apiB\x0bClientProtoP\x01ZAgoogle.g\ + olang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAP\ + IJ\xbf~\n\x07\x12\x05\x0e\0\xc7\x03\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\ + \0\x122\xb1\x04\x20Copyright\x202024\x20Google\x20LLC\n\n\x20Licensed\ + \x20under\x20the\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"Li\ + cense\");\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\x20Unless\x20required\x20by\x20appl\ + icable\x20law\x20or\x20agreed\x20to\x20in\x20writing,\x20software\n\x20d\ + istributed\x20under\x20the\x20License\x20is\x20distributed\x20on\x20an\ + \x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITION\ + S\x20OF\x20ANY\x20KIND,\x20either\x20express\x20or\x20implied.\n\x20See\ + \x20the\x20License\x20for\x20the\x20specific\x20language\x20governing\ + \x20permissions\x20and\n\x20limitations\x20under\x20the\x20License.\n\n\ + \x08\n\x01\x02\x12\x03\x10\0\x13\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\0X\n\t\n\x02\x08\x0b\x12\x03\x16\0X\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\0\"\n\t\n\x02\ + \x08$\x12\x03\x1a\0\"\n\t\n\x01\x07\x12\x04\x1c\0A\x01\n\x85\x0b\n\x02\ + \x07\0\x12\x03@\x02*\x1a\xf9\n\x20A\x20definition\x20of\x20a\x20client\ + \x20library\x20method\x20signature.\n\n\x20In\x20client\x20libraries,\ + \x20each\x20proto\x20RPC\x20corresponds\x20to\x20one\x20or\x20more\x20me\ + thods\n\x20which\x20the\x20end\x20user\x20is\x20able\x20to\x20call,\x20a\ + nd\x20calls\x20the\x20underlying\x20RPC.\n\x20Normally,\x20this\x20metho\ + d\x20receives\x20a\x20single\x20argument\x20(a\x20struct\x20or\x20instan\ + ce\n\x20corresponding\x20to\x20the\x20RPC\x20request\x20object).\x20Defi\ + ning\x20this\x20field\x20will\n\x20add\x20one\x20or\x20more\x20overloads\ + \x20providing\x20flattened\x20or\x20simpler\x20method\x20signatures\n\ + \x20in\x20some\x20languages.\n\n\x20The\x20fields\x20on\x20the\x20method\ + \x20signature\x20are\x20provided\x20as\x20a\x20comma-separated\n\x20stri\ + ng.\n\n\x20For\x20example,\x20the\x20proto\x20RPC\x20and\x20annotation:\ + \n\n\x20\x20\x20rpc\x20CreateSubscription(CreateSubscriptionRequest)\n\ + \x20\x20\x20\x20\x20\x20\x20returns\x20(Subscription)\x20{\n\x20\x20\x20\ + \x20\x20option\x20(google.api.method_signature)\x20=\x20\"name,topic\";\ + \n\x20\x20\x20}\n\n\x20Would\x20add\x20the\x20following\x20Java\x20overl\ + oad\x20(in\x20addition\x20to\x20the\x20method\x20accepting\n\x20the\x20r\ + equest\x20object):\n\n\x20\x20\x20public\x20final\x20Subscription\x20cre\ + ateSubscription(String\x20name,\x20String\x20topic)\n\n\x20The\x20follow\ + ing\x20backwards-compatibility\x20guidelines\x20apply:\n\n\x20\x20\x20*\ + \x20Adding\x20this\x20annotation\x20to\x20an\x20unannotated\x20method\ + \x20is\x20backwards\n\x20\x20\x20\x20\x20compatible.\n\x20\x20\x20*\x20A\ + dding\x20this\x20annotation\x20to\x20a\x20method\x20which\x20already\x20\ + has\x20existing\n\x20\x20\x20\x20\x20method\x20signature\x20annotations\ + \x20is\x20backwards\x20compatible\x20if\x20and\x20only\x20if\n\x20\x20\ + \x20\x20\x20the\x20new\x20method\x20signature\x20annotation\x20is\x20las\ + t\x20in\x20the\x20sequence.\n\x20\x20\x20*\x20Modifying\x20or\x20removin\ + g\x20an\x20existing\x20method\x20signature\x20annotation\x20is\n\x20\x20\ + \x20\x20\x20a\x20breaking\x20change.\n\x20\x20\x20*\x20Re-ordering\x20ex\ + isting\x20method\x20signature\x20annotations\x20is\x20a\x20breaking\n\ + \x20\x20\x20\x20\x20change.\n\n\n\n\x03\x07\0\x02\x12\x03\x1c\x07$\n\n\n\ + \x03\x07\0\x04\x12\x03@\x02\n\n\n\n\x03\x07\0\x05\x12\x03@\x0b\x11\n\n\n\ + \x03\x07\0\x01\x12\x03@\x12\"\n\n\n\x03\x07\0\x03\x12\x03@%)\n\t\n\x01\ + \x07\x12\x04C\0t\x01\n\xca\x01\n\x02\x07\x01\x12\x03M\x02\x1d\x1a\xbe\ + \x01\x20The\x20hostname\x20for\x20this\x20service.\n\x20This\x20should\ + \x20be\x20specified\x20with\x20no\x20prefix\x20or\x20protocol.\n\n\x20Ex\ + ample:\n\n\x20\x20\x20service\x20Foo\x20{\n\x20\x20\x20\x20\x20option\ + \x20(google.api.default_host)\x20=\x20\"foo.googleapi.com\";\n\x20\x20\ + \x20\x20\x20...\n\x20\x20\x20}\n\n\n\n\x03\x07\x01\x02\x12\x03C\x07%\n\n\ + \n\x03\x07\x01\x05\x12\x03M\x02\x08\n\n\n\x03\x07\x01\x01\x12\x03M\t\x15\ + \n\n\n\x03\x07\x01\x03\x12\x03M\x18\x1c\n\xc3\x03\n\x02\x07\x02\x12\x03c\ + \x02\x1d\x1a\xb7\x03\x20OAuth\x20scopes\x20needed\x20for\x20the\x20clien\ + t.\n\n\x20Example:\n\n\x20\x20\x20service\x20Foo\x20{\n\x20\x20\x20\x20\ + \x20option\x20(google.api.oauth_scopes)\x20=\x20\\\n\x20\x20\x20\x20\x20\ + \x20\x20\"https://www.googleapis.com/auth/cloud-platform\";\n\x20\x20\ + \x20\x20\x20...\n\x20\x20\x20}\n\n\x20If\x20there\x20is\x20more\x20than\ + \x20one\x20scope,\x20use\x20a\x20comma-separated\x20string:\n\n\x20Examp\ + le:\n\n\x20\x20\x20service\x20Foo\x20{\n\x20\x20\x20\x20\x20option\x20(g\ + oogle.api.oauth_scopes)\x20=\x20\\\n\x20\x20\x20\x20\x20\x20\x20\"https:\ + //www.googleapis.com/auth/cloud-platform,\"\n\x20\x20\x20\x20\x20\x20\ + \x20\"https://www.googleapis.com/auth/monitoring\";\n\x20\x20\x20\x20\ + \x20...\n\x20\x20\x20}\n\n\n\n\x03\x07\x02\x02\x12\x03C\x07%\n\n\n\x03\ + \x07\x02\x05\x12\x03c\x02\x08\n\n\n\x03\x07\x02\x01\x12\x03c\t\x15\n\n\n\ + \x03\x07\x02\x03\x12\x03c\x18\x1c\n\x9d\x05\n\x02\x07\x03\x12\x03s\x02!\ + \x1a\x91\x05\x20The\x20API\x20version\x20of\x20this\x20service,\x20which\ + \x20should\x20be\x20sent\x20by\x20version-aware\n\x20clients\x20to\x20th\ + e\x20service.\x20This\x20allows\x20services\x20to\x20abide\x20by\x20the\ + \x20schema\x20and\n\x20behavior\x20of\x20the\x20service\x20at\x20the\x20\ + time\x20this\x20API\x20version\x20was\x20deployed.\n\x20The\x20format\ + \x20of\x20the\x20API\x20version\x20must\x20be\x20treated\x20as\x20opaque\ + \x20by\x20clients.\n\x20Services\x20may\x20use\x20a\x20format\x20with\ + \x20an\x20apparent\x20structure,\x20but\x20clients\x20must\n\x20not\x20r\ + ely\x20on\x20this\x20to\x20determine\x20components\x20within\x20an\x20AP\ + I\x20version,\x20or\x20attempt\n\x20to\x20construct\x20other\x20valid\ + \x20API\x20versions.\x20Note\x20that\x20this\x20is\x20for\x20upcoming\n\ + \x20functionality\x20and\x20may\x20not\x20be\x20implemented\x20for\x20al\ + l\x20services.\n\n\x20Example:\n\n\x20\x20\x20service\x20Foo\x20{\n\x20\ + \x20\x20\x20\x20option\x20(google.api.api_version)\x20=\x20\"v1_20230821\ + _preview\";\n\x20\x20\x20}\n\n\n\n\x03\x07\x03\x02\x12\x03C\x07%\n\n\n\ + \x03\x07\x03\x05\x12\x03s\x02\x08\n\n\n\x03\x07\x03\x01\x12\x03s\t\x14\n\ + \n\n\x03\x07\x03\x03\x12\x03s\x17\x20\n7\n\x02\x04\0\x12\x05w\0\x81\x01\ + \x01\x1a*\x20Required\x20information\x20for\x20every\x20language.\n\n\n\ + \n\x03\x04\0\x01\x12\x03w\x08\x1e\n\x8f\x01\n\x04\x04\0\x02\0\x12\x03z\ + \x024\x1a\x81\x01\x20Link\x20to\x20automatically\x20generated\x20referen\ + ce\x20documentation.\x20\x20Example:\n\x20https://cloud.google.com/nodej\ + s/docs/reference/asset/latest\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03z\x02\ + \x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03z\t\x1b\n\x0c\n\x05\x04\0\x02\0\ + \x03\x12\x03z\x1e\x1f\n\x0c\n\x05\x04\0\x02\0\x08\x12\x03z\x203\n\r\n\ + \x06\x04\0\x02\0\x08\x03\x12\x03z!2\nX\n\x04\x04\0\x02\x01\x12\x03}\x025\ + \x1aK\x20The\x20destination\x20where\x20API\x20teams\x20want\x20this\x20\ + client\x20library\x20to\x20be\x20published.\n\n\x0c\n\x05\x04\0\x02\x01\ + \x04\x12\x03}\x02\n\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03}\x0b#\n\x0c\n\ + \x05\x04\0\x02\x01\x01\x12\x03}$0\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03}\ + 34\nU\n\x04\x04\0\x02\x02\x12\x04\x80\x01\x02:\x1aG\x20Configuration\x20\ + for\x20which\x20RPCs\x20should\x20be\x20generated\x20in\x20the\x20GAPIC\ + \x20client.\n\n\r\n\x05\x04\0\x02\x02\x06\x12\x04\x80\x01\x02\x1a\n\r\n\ + \x05\x04\0\x02\x02\x01\x12\x04\x80\x01\x1b5\n\r\n\x05\x04\0\x02\x02\x03\ + \x12\x04\x80\x0189\nH\n\x02\x04\x01\x12\x06\x84\x01\0\xa8\x01\x01\x1a:\ + \x20Details\x20about\x20how\x20and\x20where\x20to\x20publish\x20client\ + \x20libraries.\n\n\x0b\n\x03\x04\x01\x01\x12\x04\x84\x01\x08\x1d\n\xda\ + \x01\n\x04\x04\x01\x02\0\x12\x04\x88\x01\x02\x15\x1a\xcb\x01\x20Version\ + \x20of\x20the\x20API\x20to\x20apply\x20these\x20settings\x20to.\x20This\ + \x20is\x20the\x20full\x20protobuf\n\x20package\x20for\x20the\x20API,\x20\ + ending\x20in\x20the\x20version\x20element.\n\x20Examples:\x20\"google.cl\ + oud.speech.v1\"\x20and\x20\"google.spanner.admin.database.v1\".\n\n\r\n\ + \x05\x04\x01\x02\0\x05\x12\x04\x88\x01\x02\x08\n\r\n\x05\x04\x01\x02\0\ + \x01\x12\x04\x88\x01\t\x10\n\r\n\x05\x04\x01\x02\0\x03\x12\x04\x88\x01\ + \x13\x14\n8\n\x04\x04\x01\x02\x01\x12\x04\x8b\x01\x02\x1f\x1a*\x20Launch\ + \x20stage\x20of\x20this\x20version\x20of\x20the\x20API.\n\n\r\n\x05\x04\ + \x01\x02\x01\x06\x12\x04\x8b\x01\x02\r\n\r\n\x05\x04\x01\x02\x01\x01\x12\ + \x04\x8b\x01\x0e\x1a\n\r\n\x05\x04\x01\x02\x01\x03\x12\x04\x8b\x01\x1d\ + \x1e\np\n\x04\x04\x01\x02\x02\x12\x04\x8f\x01\x02\x1e\x1ab\x20When\x20us\ + ing\x20transport=rest,\x20the\x20client\x20request\x20will\x20encode\x20\ + enums\x20as\n\x20numbers\x20rather\x20than\x20strings.\n\n\r\n\x05\x04\ + \x01\x02\x02\x05\x12\x04\x8f\x01\x02\x06\n\r\n\x05\x04\x01\x02\x02\x01\ + \x12\x04\x8f\x01\x07\x19\n\r\n\x05\x04\x01\x02\x02\x03\x12\x04\x8f\x01\ + \x1c\x1d\nQ\n\x04\x04\x01\x02\x03\x12\x04\x92\x01\x02\"\x1aC\x20Settings\ + \x20for\x20legacy\x20Java\x20features,\x20supported\x20in\x20the\x20Serv\ + ice\x20YAML.\n\n\r\n\x05\x04\x01\x02\x03\x06\x12\x04\x92\x01\x02\x0e\n\r\ + \n\x05\x04\x01\x02\x03\x01\x12\x04\x92\x01\x0f\x1c\n\r\n\x05\x04\x01\x02\ + \x03\x03\x12\x04\x92\x01\x1f!\n2\n\x04\x04\x01\x02\x04\x12\x04\x95\x01\ \x02\x20\x1a$\x20Settings\x20for\x20C++\x20client\x20libraries.\n\n\r\n\ - \x05\x04\x01\x02\x04\x06\x12\x04\x82\x01\x02\r\n\r\n\x05\x04\x01\x02\x04\ - \x01\x12\x04\x82\x01\x0e\x1a\n\r\n\x05\x04\x01\x02\x04\x03\x12\x04\x82\ - \x01\x1d\x1f\n2\n\x04\x04\x01\x02\x05\x12\x04\x85\x01\x02\x20\x1a$\x20Se\ + \x05\x04\x01\x02\x04\x06\x12\x04\x95\x01\x02\r\n\r\n\x05\x04\x01\x02\x04\ + \x01\x12\x04\x95\x01\x0e\x1a\n\r\n\x05\x04\x01\x02\x04\x03\x12\x04\x95\ + \x01\x1d\x1f\n2\n\x04\x04\x01\x02\x05\x12\x04\x98\x01\x02\x20\x1a$\x20Se\ ttings\x20for\x20PHP\x20client\x20libraries.\n\n\r\n\x05\x04\x01\x02\x05\ - \x06\x12\x04\x85\x01\x02\r\n\r\n\x05\x04\x01\x02\x05\x01\x12\x04\x85\x01\ - \x0e\x1a\n\r\n\x05\x04\x01\x02\x05\x03\x12\x04\x85\x01\x1d\x1f\n5\n\x04\ - \x04\x01\x02\x06\x12\x04\x88\x01\x02&\x1a'\x20Settings\x20for\x20Python\ - \x20client\x20libraries.\n\n\r\n\x05\x04\x01\x02\x06\x06\x12\x04\x88\x01\ - \x02\x10\n\r\n\x05\x04\x01\x02\x06\x01\x12\x04\x88\x01\x11\x20\n\r\n\x05\ - \x04\x01\x02\x06\x03\x12\x04\x88\x01#%\n3\n\x04\x04\x01\x02\x07\x12\x04\ - \x8b\x01\x02\"\x1a%\x20Settings\x20for\x20Node\x20client\x20libraries.\n\ - \n\r\n\x05\x04\x01\x02\x07\x06\x12\x04\x8b\x01\x02\x0e\n\r\n\x05\x04\x01\ - \x02\x07\x01\x12\x04\x8b\x01\x0f\x1c\n\r\n\x05\x04\x01\x02\x07\x03\x12\ - \x04\x8b\x01\x1f!\n3\n\x04\x04\x01\x02\x08\x12\x04\x8e\x01\x02&\x1a%\x20\ + \x06\x12\x04\x98\x01\x02\r\n\r\n\x05\x04\x01\x02\x05\x01\x12\x04\x98\x01\ + \x0e\x1a\n\r\n\x05\x04\x01\x02\x05\x03\x12\x04\x98\x01\x1d\x1f\n5\n\x04\ + \x04\x01\x02\x06\x12\x04\x9b\x01\x02&\x1a'\x20Settings\x20for\x20Python\ + \x20client\x20libraries.\n\n\r\n\x05\x04\x01\x02\x06\x06\x12\x04\x9b\x01\ + \x02\x10\n\r\n\x05\x04\x01\x02\x06\x01\x12\x04\x9b\x01\x11\x20\n\r\n\x05\ + \x04\x01\x02\x06\x03\x12\x04\x9b\x01#%\n3\n\x04\x04\x01\x02\x07\x12\x04\ + \x9e\x01\x02\"\x1a%\x20Settings\x20for\x20Node\x20client\x20libraries.\n\ + \n\r\n\x05\x04\x01\x02\x07\x06\x12\x04\x9e\x01\x02\x0e\n\r\n\x05\x04\x01\ + \x02\x07\x01\x12\x04\x9e\x01\x0f\x1c\n\r\n\x05\x04\x01\x02\x07\x03\x12\ + \x04\x9e\x01\x1f!\n3\n\x04\x04\x01\x02\x08\x12\x04\xa1\x01\x02&\x1a%\x20\ Settings\x20for\x20.NET\x20client\x20libraries.\n\n\r\n\x05\x04\x01\x02\ - \x08\x06\x12\x04\x8e\x01\x02\x10\n\r\n\x05\x04\x01\x02\x08\x01\x12\x04\ - \x8e\x01\x11\x20\n\r\n\x05\x04\x01\x02\x08\x03\x12\x04\x8e\x01#%\n3\n\ - \x04\x04\x01\x02\t\x12\x04\x91\x01\x02\"\x1a%\x20Settings\x20for\x20Ruby\ - \x20client\x20libraries.\n\n\r\n\x05\x04\x01\x02\t\x06\x12\x04\x91\x01\ - \x02\x0e\n\r\n\x05\x04\x01\x02\t\x01\x12\x04\x91\x01\x0f\x1c\n\r\n\x05\ - \x04\x01\x02\t\x03\x12\x04\x91\x01\x1f!\n1\n\x04\x04\x01\x02\n\x12\x04\ - \x94\x01\x02\x1e\x1a#\x20Settings\x20for\x20Go\x20client\x20libraries.\n\ - \n\r\n\x05\x04\x01\x02\n\x06\x12\x04\x94\x01\x02\x0c\n\r\n\x05\x04\x01\ - \x02\n\x01\x12\x04\x94\x01\r\x18\n\r\n\x05\x04\x01\x02\n\x03\x12\x04\x94\ - \x01\x1b\x1d\n\xc4\x01\n\x02\x04\x02\x12\x06\x9a\x01\0\xc2\x01\x01\x1a\ + \x08\x06\x12\x04\xa1\x01\x02\x10\n\r\n\x05\x04\x01\x02\x08\x01\x12\x04\ + \xa1\x01\x11\x20\n\r\n\x05\x04\x01\x02\x08\x03\x12\x04\xa1\x01#%\n3\n\ + \x04\x04\x01\x02\t\x12\x04\xa4\x01\x02\"\x1a%\x20Settings\x20for\x20Ruby\ + \x20client\x20libraries.\n\n\r\n\x05\x04\x01\x02\t\x06\x12\x04\xa4\x01\ + \x02\x0e\n\r\n\x05\x04\x01\x02\t\x01\x12\x04\xa4\x01\x0f\x1c\n\r\n\x05\ + \x04\x01\x02\t\x03\x12\x04\xa4\x01\x1f!\n1\n\x04\x04\x01\x02\n\x12\x04\ + \xa7\x01\x02\x1e\x1a#\x20Settings\x20for\x20Go\x20client\x20libraries.\n\ + \n\r\n\x05\x04\x01\x02\n\x06\x12\x04\xa7\x01\x02\x0c\n\r\n\x05\x04\x01\ + \x02\n\x01\x12\x04\xa7\x01\r\x18\n\r\n\x05\x04\x01\x02\n\x03\x12\x04\xa7\ + \x01\x1b\x1d\n\xc4\x01\n\x02\x04\x02\x12\x06\xad\x01\0\xd9\x01\x01\x1a\ \xb5\x01\x20This\x20message\x20configures\x20the\x20settings\x20for\x20p\ ublishing\x20[Google\x20Cloud\x20Client\n\x20libraries](https://cloud.go\ ogle.com/apis/docs/cloud-client-libraries)\n\x20generated\x20from\x20the\ - \x20service\x20config.\n\n\x0b\n\x03\x04\x02\x01\x12\x04\x9a\x01\x08\x12\ - \nz\n\x04\x04\x02\x02\0\x12\x04\x9d\x01\x02.\x1al\x20A\x20list\x20of\x20\ + \x20service\x20config.\n\n\x0b\n\x03\x04\x02\x01\x12\x04\xad\x01\x08\x12\ + \nz\n\x04\x04\x02\x02\0\x12\x04\xb0\x01\x02.\x1al\x20A\x20list\x20of\x20\ API\x20method\x20settings,\x20e.g.\x20the\x20behavior\x20for\x20methods\ \x20that\x20use\x20the\n\x20long-running\x20operation\x20pattern.\n\n\r\ - \n\x05\x04\x02\x02\0\x04\x12\x04\x9d\x01\x02\n\n\r\n\x05\x04\x02\x02\0\ - \x06\x12\x04\x9d\x01\x0b\x19\n\r\n\x05\x04\x02\x02\0\x01\x12\x04\x9d\x01\ - \x1a)\n\r\n\x05\x04\x02\x02\0\x03\x12\x04\x9d\x01,-\n\x9e\x01\n\x04\x04\ - \x02\x02\x01\x12\x04\xa1\x01\x02\x1d\x1a\x8f\x01\x20Link\x20to\x20a\x20*\ + \n\x05\x04\x02\x02\0\x04\x12\x04\xb0\x01\x02\n\n\r\n\x05\x04\x02\x02\0\ + \x06\x12\x04\xb0\x01\x0b\x19\n\r\n\x05\x04\x02\x02\0\x01\x12\x04\xb0\x01\ + \x1a)\n\r\n\x05\x04\x02\x02\0\x03\x12\x04\xb0\x01,-\n\x9e\x01\n\x04\x04\ + \x02\x02\x01\x12\x04\xb4\x01\x02\x1d\x1a\x8f\x01\x20Link\x20to\x20a\x20*\ public*\x20URI\x20where\x20users\x20can\x20report\x20issues.\x20\x20Exam\ ple:\n\x20https://issuetracker.google.com/issues/new?component=190865&te\ - mplate=1161103\n\n\r\n\x05\x04\x02\x02\x01\x05\x12\x04\xa1\x01\x02\x08\n\ - \r\n\x05\x04\x02\x02\x01\x01\x12\x04\xa1\x01\t\x16\n\r\n\x05\x04\x02\x02\ - \x01\x03\x12\x04\xa1\x01\x19\x1c\nl\n\x04\x04\x02\x02\x02\x12\x04\xa5\ + mplate=1161103\n\n\r\n\x05\x04\x02\x02\x01\x05\x12\x04\xb4\x01\x02\x08\n\ + \r\n\x05\x04\x02\x02\x01\x01\x12\x04\xb4\x01\t\x16\n\r\n\x05\x04\x02\x02\ + \x01\x03\x12\x04\xb4\x01\x19\x1c\nl\n\x04\x04\x02\x02\x02\x12\x04\xb8\ \x01\x02!\x1a^\x20Link\x20to\x20product\x20home\x20page.\x20\x20Example:\ \n\x20https://cloud.google.com/asset-inventory/docs/overview\n\n\r\n\x05\ - \x04\x02\x02\x02\x05\x12\x04\xa5\x01\x02\x08\n\r\n\x05\x04\x02\x02\x02\ - \x01\x12\x04\xa5\x01\t\x1a\n\r\n\x05\x04\x02\x02\x02\x03\x12\x04\xa5\x01\ - \x1d\x20\n\xb7\x01\n\x04\x04\x02\x02\x03\x12\x04\xaa\x01\x02\x1e\x1a\xa8\ + \x04\x02\x02\x02\x05\x12\x04\xb8\x01\x02\x08\n\r\n\x05\x04\x02\x02\x02\ + \x01\x12\x04\xb8\x01\t\x1a\n\r\n\x05\x04\x02\x02\x02\x03\x12\x04\xb8\x01\ + \x1d\x20\n\xb7\x01\n\x04\x04\x02\x02\x03\x12\x04\xbd\x01\x02\x1e\x1a\xa8\ \x01\x20Used\x20as\x20a\x20tracking\x20tag\x20when\x20collecting\x20data\ \x20about\x20the\x20APIs\x20developer\n\x20relations\x20artifacts\x20lik\ e\x20docs,\x20packages\x20delivered\x20to\x20package\x20managers,\n\x20e\ tc.\x20\x20Example:\x20\"speech\".\n\n\r\n\x05\x04\x02\x02\x03\x05\x12\ - \x04\xaa\x01\x02\x08\n\r\n\x05\x04\x02\x02\x03\x01\x12\x04\xaa\x01\t\x17\ - \n\r\n\x05\x04\x02\x02\x03\x03\x12\x04\xaa\x01\x1a\x1d\nV\n\x04\x04\x02\ - \x02\x04\x12\x04\xad\x01\x02\x1c\x1aH\x20GitHub\x20label\x20to\x20apply\ + \x04\xbd\x01\x02\x08\n\r\n\x05\x04\x02\x02\x03\x01\x12\x04\xbd\x01\t\x17\ + \n\r\n\x05\x04\x02\x02\x03\x03\x12\x04\xbd\x01\x1a\x1d\nV\n\x04\x04\x02\ + \x02\x04\x12\x04\xc0\x01\x02\x1c\x1aH\x20GitHub\x20label\x20to\x20apply\ \x20to\x20issues\x20and\x20pull\x20requests\x20opened\x20for\x20this\x20\ - API.\n\n\r\n\x05\x04\x02\x02\x04\x05\x12\x04\xad\x01\x02\x08\n\r\n\x05\ - \x04\x02\x02\x04\x01\x12\x04\xad\x01\t\x15\n\r\n\x05\x04\x02\x02\x04\x03\ - \x12\x04\xad\x01\x18\x1b\n\x91\x01\n\x04\x04\x02\x02\x05\x12\x04\xb1\x01\ + API.\n\n\r\n\x05\x04\x02\x02\x04\x05\x12\x04\xc0\x01\x02\x08\n\r\n\x05\ + \x04\x02\x02\x04\x01\x12\x04\xc0\x01\t\x15\n\r\n\x05\x04\x02\x02\x04\x03\ + \x12\x04\xc0\x01\x18\x1b\n\x91\x01\n\x04\x04\x02\x02\x05\x12\x04\xc4\x01\ \x02/\x1a\x82\x01\x20GitHub\x20teams\x20to\x20be\x20added\x20to\x20CODEO\ WNERS\x20in\x20the\x20directory\x20in\x20GitHub\n\x20containing\x20sourc\ e\x20code\x20for\x20the\x20client\x20libraries\x20for\x20this\x20API.\n\ - \n\r\n\x05\x04\x02\x02\x05\x04\x12\x04\xb1\x01\x02\n\n\r\n\x05\x04\x02\ - \x02\x05\x05\x12\x04\xb1\x01\x0b\x11\n\r\n\x05\x04\x02\x02\x05\x01\x12\ - \x04\xb1\x01\x12(\n\r\n\x05\x04\x02\x02\x05\x03\x12\x04\xb1\x01+.\ne\n\ - \x04\x04\x02\x02\x06\x12\x04\xb5\x01\x02\x1e\x1aW\x20A\x20prefix\x20used\ + \n\r\n\x05\x04\x02\x02\x05\x04\x12\x04\xc4\x01\x02\n\n\r\n\x05\x04\x02\ + \x02\x05\x05\x12\x04\xc4\x01\x0b\x11\n\r\n\x05\x04\x02\x02\x05\x01\x12\ + \x04\xc4\x01\x12(\n\r\n\x05\x04\x02\x02\x05\x03\x12\x04\xc4\x01+.\ne\n\ + \x04\x04\x02\x02\x06\x12\x04\xc8\x01\x02\x1e\x1aW\x20A\x20prefix\x20used\ \x20in\x20sample\x20code\x20when\x20demarking\x20regions\x20to\x20be\x20\ included\x20in\n\x20documentation.\n\n\r\n\x05\x04\x02\x02\x06\x05\x12\ - \x04\xb5\x01\x02\x08\n\r\n\x05\x04\x02\x02\x06\x01\x12\x04\xb5\x01\t\x17\ - \n\r\n\x05\x04\x02\x02\x06\x03\x12\x04\xb5\x01\x1a\x1d\n?\n\x04\x04\x02\ - \x02\x07\x12\x04\xb8\x01\x02/\x1a1\x20For\x20whom\x20the\x20client\x20li\ + \x04\xc8\x01\x02\x08\n\r\n\x05\x04\x02\x02\x06\x01\x12\x04\xc8\x01\t\x17\ + \n\r\n\x05\x04\x02\x02\x06\x03\x12\x04\xc8\x01\x1a\x1d\n?\n\x04\x04\x02\ + \x02\x07\x12\x04\xcb\x01\x02/\x1a1\x20For\x20whom\x20the\x20client\x20li\ brary\x20is\x20being\x20published.\n\n\r\n\x05\x04\x02\x02\x07\x06\x12\ - \x04\xb8\x01\x02\x1b\n\r\n\x05\x04\x02\x02\x07\x01\x12\x04\xb8\x01\x1c(\ - \n\r\n\x05\x04\x02\x02\x07\x03\x12\x04\xb8\x01+.\n\xd0\x01\n\x04\x04\x02\ - \x02\x08\x12\x04\xbd\x01\x028\x1a\xc1\x01\x20Client\x20library\x20settin\ + \x04\xcb\x01\x02\x1b\n\r\n\x05\x04\x02\x02\x07\x01\x12\x04\xcb\x01\x1c(\ + \n\r\n\x05\x04\x02\x02\x07\x03\x12\x04\xcb\x01+.\n\xd0\x01\n\x04\x04\x02\ + \x02\x08\x12\x04\xd0\x01\x028\x1a\xc1\x01\x20Client\x20library\x20settin\ gs.\x20\x20If\x20the\x20same\x20version\x20string\x20appears\x20multiple\ \n\x20times\x20in\x20this\x20list,\x20then\x20the\x20last\x20one\x20wins\ .\x20\x20Settings\x20from\x20earlier\n\x20settings\x20with\x20the\x20sam\ e\x20version\x20string\x20are\x20discarded.\n\n\r\n\x05\x04\x02\x02\x08\ - \x04\x12\x04\xbd\x01\x02\n\n\r\n\x05\x04\x02\x02\x08\x06\x12\x04\xbd\x01\ - \x0b\x20\n\r\n\x05\x04\x02\x02\x08\x01\x12\x04\xbd\x01!1\n\r\n\x05\x04\ - \x02\x02\x08\x03\x12\x04\xbd\x0147\n\x82\x01\n\x04\x04\x02\x02\t\x12\x04\ - \xc1\x01\x021\x1at\x20Optional\x20link\x20to\x20proto\x20reference\x20do\ + \x04\x12\x04\xd0\x01\x02\n\n\r\n\x05\x04\x02\x02\x08\x06\x12\x04\xd0\x01\ + \x0b\x20\n\r\n\x05\x04\x02\x02\x08\x01\x12\x04\xd0\x01!1\n\r\n\x05\x04\ + \x02\x02\x08\x03\x12\x04\xd0\x0147\n\x82\x01\n\x04\x04\x02\x02\t\x12\x04\ + \xd4\x01\x021\x1at\x20Optional\x20link\x20to\x20proto\x20reference\x20do\ cumentation.\x20\x20Example:\n\x20https://cloud.google.com/pubsub/lite/d\ - ocs/reference/rpc\n\n\r\n\x05\x04\x02\x02\t\x05\x12\x04\xc1\x01\x02\x08\ - \n\r\n\x05\x04\x02\x02\t\x01\x12\x04\xc1\x01\t*\n\r\n\x05\x04\x02\x02\t\ - \x03\x12\x04\xc1\x01-0\n3\n\x02\x04\x03\x12\x06\xc5\x01\0\xe5\x01\x01\ - \x1a%\x20Settings\x20for\x20Java\x20client\x20libraries.\n\n\x0b\n\x03\ - \x04\x03\x01\x12\x04\xc5\x01\x08\x14\n\xa1\x03\n\x04\x04\x03\x02\0\x12\ - \x04\xd1\x01\x02\x1d\x1a\x92\x03\x20The\x20package\x20name\x20to\x20use\ - \x20in\x20Java.\x20Clobbers\x20the\x20java_package\x20option\n\x20set\ - \x20in\x20the\x20protobuf.\x20This\x20should\x20be\x20used\x20**only**\ - \x20by\x20APIs\n\x20who\x20have\x20already\x20set\x20the\x20language_set\ - tings.java.package_name\"\x20field\n\x20in\x20gapic.yaml.\x20API\x20team\ - s\x20should\x20use\x20the\x20protobuf\x20java_package\x20option\n\x20whe\ - re\x20possible.\n\n\x20Example\x20of\x20a\x20YAML\x20configuration::\n\n\ - \x20\x20publishing:\n\x20\x20\x20\x20java_settings:\n\x20\x20\x20\x20\ - \x20\x20library_package:\x20com.google.cloud.pubsub.v1\n\n\r\n\x05\x04\ - \x03\x02\0\x05\x12\x04\xd1\x01\x02\x08\n\r\n\x05\x04\x03\x02\0\x01\x12\ - \x04\xd1\x01\t\x18\n\r\n\x05\x04\x03\x02\0\x03\x12\x04\xd1\x01\x1b\x1c\n\ - \xb6\x04\n\x04\x04\x03\x02\x01\x12\x04\xe1\x01\x02.\x1a\xa7\x04\x20Confi\ - gure\x20the\x20Java\x20class\x20name\x20to\x20use\x20instead\x20of\x20th\ - e\x20service's\x20for\x20its\n\x20corresponding\x20generated\x20GAPIC\ - \x20client.\x20Keys\x20are\x20fully-qualified\n\x20service\x20names\x20a\ - s\x20they\x20appear\x20in\x20the\x20protobuf\x20(including\x20the\x20ful\ - l\n\x20the\x20language_settings.java.interface_names\"\x20field\x20in\ - \x20gapic.yaml.\x20API\n\x20teams\x20should\x20otherwise\x20use\x20the\ - \x20service\x20name\x20as\x20it\x20appears\x20in\x20the\n\x20protobuf.\n\ - \n\x20Example\x20of\x20a\x20YAML\x20configuration::\n\n\x20\x20publishin\ - g:\n\x20\x20\x20\x20java_settings:\n\x20\x20\x20\x20\x20\x20service_clas\ - s_names:\n\x20\x20\x20\x20\x20\x20\x20\x20-\x20google.pubsub.v1.Publishe\ - r:\x20TopicAdmin\n\x20\x20\x20\x20\x20\x20\x20\x20-\x20google.pubsub.v1.\ - Subscriber:\x20SubscriptionAdmin\n\n\r\n\x05\x04\x03\x02\x01\x06\x12\x04\ - \xe1\x01\x02\x15\n\r\n\x05\x04\x03\x02\x01\x01\x12\x04\xe1\x01\x16)\n\r\ - \n\x05\x04\x03\x02\x01\x03\x12\x04\xe1\x01,-\n\x1e\n\x04\x04\x03\x02\x02\ - \x12\x04\xe4\x01\x02$\x1a\x10\x20Some\x20settings.\n\n\r\n\x05\x04\x03\ - \x02\x02\x06\x12\x04\xe4\x01\x02\x18\n\r\n\x05\x04\x03\x02\x02\x01\x12\ - \x04\xe4\x01\x19\x1f\n\r\n\x05\x04\x03\x02\x02\x03\x12\x04\xe4\x01\"#\n2\ - \n\x02\x04\x04\x12\x06\xe8\x01\0\xeb\x01\x01\x1a$\x20Settings\x20for\x20\ - C++\x20client\x20libraries.\n\n\x0b\n\x03\x04\x04\x01\x12\x04\xe8\x01\ - \x08\x13\n\x1e\n\x04\x04\x04\x02\0\x12\x04\xea\x01\x02$\x1a\x10\x20Some\ - \x20settings.\n\n\r\n\x05\x04\x04\x02\0\x06\x12\x04\xea\x01\x02\x18\n\r\ - \n\x05\x04\x04\x02\0\x01\x12\x04\xea\x01\x19\x1f\n\r\n\x05\x04\x04\x02\0\ - \x03\x12\x04\xea\x01\"#\n2\n\x02\x04\x05\x12\x06\xee\x01\0\xf1\x01\x01\ - \x1a$\x20Settings\x20for\x20Php\x20client\x20libraries.\n\n\x0b\n\x03\ - \x04\x05\x01\x12\x04\xee\x01\x08\x13\n\x1e\n\x04\x04\x05\x02\0\x12\x04\ - \xf0\x01\x02$\x1a\x10\x20Some\x20settings.\n\n\r\n\x05\x04\x05\x02\0\x06\ - \x12\x04\xf0\x01\x02\x18\n\r\n\x05\x04\x05\x02\0\x01\x12\x04\xf0\x01\x19\ - \x1f\n\r\n\x05\x04\x05\x02\0\x03\x12\x04\xf0\x01\"#\n5\n\x02\x04\x06\x12\ - \x06\xf4\x01\0\xf7\x01\x01\x1a'\x20Settings\x20for\x20Python\x20client\ - \x20libraries.\n\n\x0b\n\x03\x04\x06\x01\x12\x04\xf4\x01\x08\x16\n\x1e\n\ - \x04\x04\x06\x02\0\x12\x04\xf6\x01\x02$\x1a\x10\x20Some\x20settings.\n\n\ - \r\n\x05\x04\x06\x02\0\x06\x12\x04\xf6\x01\x02\x18\n\r\n\x05\x04\x06\x02\ - \0\x01\x12\x04\xf6\x01\x19\x1f\n\r\n\x05\x04\x06\x02\0\x03\x12\x04\xf6\ - \x01\"#\n3\n\x02\x04\x07\x12\x06\xfa\x01\0\xfd\x01\x01\x1a%\x20Settings\ - \x20for\x20Node\x20client\x20libraries.\n\n\x0b\n\x03\x04\x07\x01\x12\ - \x04\xfa\x01\x08\x14\n\x1e\n\x04\x04\x07\x02\0\x12\x04\xfc\x01\x02$\x1a\ - \x10\x20Some\x20settings.\n\n\r\n\x05\x04\x07\x02\0\x06\x12\x04\xfc\x01\ - \x02\x18\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\xfc\x01\x19\x1f\n\r\n\x05\ - \x04\x07\x02\0\x03\x12\x04\xfc\x01\"#\n5\n\x02\x04\x08\x12\x06\x80\x02\0\ - \xa1\x02\x01\x1a'\x20Settings\x20for\x20Dotnet\x20client\x20libraries.\n\ - \n\x0b\n\x03\x04\x08\x01\x12\x04\x80\x02\x08\x16\n\x1e\n\x04\x04\x08\x02\ - \0\x12\x04\x82\x02\x02$\x1a\x10\x20Some\x20settings.\n\n\r\n\x05\x04\x08\ - \x02\0\x06\x12\x04\x82\x02\x02\x18\n\r\n\x05\x04\x08\x02\0\x01\x12\x04\ - \x82\x02\x19\x1f\n\r\n\x05\x04\x08\x02\0\x03\x12\x04\x82\x02\"#\n\xe6\ - \x01\n\x04\x04\x08\x02\x01\x12\x04\x89\x02\x02+\x1a\xd7\x01\x20Map\x20fr\ - om\x20original\x20service\x20names\x20to\x20renamed\x20versions.\n\x20Th\ - is\x20is\x20used\x20when\x20the\x20default\x20generated\x20types\n\x20wo\ - uld\x20cause\x20a\x20naming\x20conflict.\x20(Neither\x20name\x20is\n\x20\ - fully-qualified.)\n\x20Example:\x20Subscriber\x20to\x20SubscriberService\ - Api.\n\n\r\n\x05\x04\x08\x02\x01\x06\x12\x04\x89\x02\x02\x15\n\r\n\x05\ - \x04\x08\x02\x01\x01\x12\x04\x89\x02\x16&\n\r\n\x05\x04\x08\x02\x01\x03\ - \x12\x04\x89\x02)*\n\x8d\x02\n\x04\x04\x08\x02\x02\x12\x04\x90\x02\x02,\ - \x1a\xfe\x01\x20Map\x20from\x20full\x20resource\x20types\x20to\x20the\ - \x20effective\x20short\x20name\n\x20for\x20the\x20resource.\x20This\x20i\ - s\x20used\x20when\x20otherwise\x20resource\n\x20named\x20from\x20differe\ - nt\x20services\x20would\x20cause\x20naming\x20collisions.\n\x20Example\ - \x20entry:\n\x20\"datalabeling.googleapis.com/Dataset\":\x20\"DataLabeli\ - ngDataset\"\n\n\r\n\x05\x04\x08\x02\x02\x06\x12\x04\x90\x02\x02\x15\n\r\ - \n\x05\x04\x08\x02\x02\x01\x12\x04\x90\x02\x16'\n\r\n\x05\x04\x08\x02\ - \x02\x03\x12\x04\x90\x02*+\n\x9e\x02\n\x04\x04\x08\x02\x03\x12\x04\x97\ - \x02\x02(\x1a\x8f\x02\x20List\x20of\x20full\x20resource\x20types\x20to\ - \x20ignore\x20during\x20generation.\n\x20This\x20is\x20typically\x20used\ - \x20for\x20API-specific\x20Location\x20resources,\n\x20which\x20should\ - \x20be\x20handled\x20by\x20the\x20generator\x20as\x20if\x20they\x20were\ - \x20actually\n\x20the\x20common\x20Location\x20resources.\n\x20Example\ - \x20entry:\x20\"documentai.googleapis.com/Location\"\n\n\r\n\x05\x04\x08\ - \x02\x03\x04\x12\x04\x97\x02\x02\n\n\r\n\x05\x04\x08\x02\x03\x05\x12\x04\ - \x97\x02\x0b\x11\n\r\n\x05\x04\x08\x02\x03\x01\x12\x04\x97\x02\x12#\n\r\ - \n\x05\x04\x08\x02\x03\x03\x12\x04\x97\x02&'\n}\n\x04\x04\x08\x02\x04\ - \x12\x04\x9b\x02\x02/\x1ao\x20Namespaces\x20which\x20must\x20be\x20alias\ - ed\x20in\x20snippets\x20due\x20to\n\x20a\x20known\x20(but\x20non-generat\ - or-predictable)\x20naming\x20collision\n\n\r\n\x05\x04\x08\x02\x04\x04\ - \x12\x04\x9b\x02\x02\n\n\r\n\x05\x04\x08\x02\x04\x05\x12\x04\x9b\x02\x0b\ - \x11\n\r\n\x05\x04\x08\x02\x04\x01\x12\x04\x9b\x02\x12*\n\r\n\x05\x04\ - \x08\x02\x04\x03\x12\x04\x9b\x02-.\n\xc7\x01\n\x04\x04\x08\x02\x05\x12\ - \x04\xa0\x02\x02-\x1a\xb8\x01\x20Method\x20signatures\x20(in\x20the\x20f\ - orm\x20\"service.method(signature)\")\n\x20which\x20are\x20provided\x20s\ - eparately,\x20so\x20shouldn't\x20be\x20generated.\n\x20Snippets\x20*call\ - ing*\x20these\x20methods\x20are\x20still\x20generated,\x20however.\n\n\r\ - \n\x05\x04\x08\x02\x05\x04\x12\x04\xa0\x02\x02\n\n\r\n\x05\x04\x08\x02\ - \x05\x05\x12\x04\xa0\x02\x0b\x11\n\r\n\x05\x04\x08\x02\x05\x01\x12\x04\ - \xa0\x02\x12(\n\r\n\x05\x04\x08\x02\x05\x03\x12\x04\xa0\x02+,\n3\n\x02\ - \x04\t\x12\x06\xa4\x02\0\xa7\x02\x01\x1a%\x20Settings\x20for\x20Ruby\x20\ - client\x20libraries.\n\n\x0b\n\x03\x04\t\x01\x12\x04\xa4\x02\x08\x14\n\ - \x1e\n\x04\x04\t\x02\0\x12\x04\xa6\x02\x02$\x1a\x10\x20Some\x20settings.\ - \n\n\r\n\x05\x04\t\x02\0\x06\x12\x04\xa6\x02\x02\x18\n\r\n\x05\x04\t\x02\ - \0\x01\x12\x04\xa6\x02\x19\x1f\n\r\n\x05\x04\t\x02\0\x03\x12\x04\xa6\x02\ - \"#\n1\n\x02\x04\n\x12\x06\xaa\x02\0\xad\x02\x01\x1a#\x20Settings\x20for\ - \x20Go\x20client\x20libraries.\n\n\x0b\n\x03\x04\n\x01\x12\x04\xaa\x02\ - \x08\x12\n\x1e\n\x04\x04\n\x02\0\x12\x04\xac\x02\x02$\x1a\x10\x20Some\ - \x20settings.\n\n\r\n\x05\x04\n\x02\0\x06\x12\x04\xac\x02\x02\x18\n\r\n\ - \x05\x04\n\x02\0\x01\x12\x04\xac\x02\x19\x1f\n\r\n\x05\x04\n\x02\0\x03\ - \x12\x04\xac\x02\"#\nC\n\x02\x04\x0b\x12\x06\xb0\x02\0\xdf\x02\x01\x1a5\ - \x20Describes\x20the\x20generator\x20configuration\x20for\x20a\x20method\ - .\n\n\x0b\n\x03\x04\x0b\x01\x12\x04\xb0\x02\x08\x16\n\x90\x03\n\x04\x04\ - \x0b\x03\0\x12\x06\xb6\x02\x02\xc7\x02\x03\x1a\xff\x02\x20Describes\x20s\ - ettings\x20to\x20use\x20when\x20generating\x20API\x20methods\x20that\x20\ - use\x20the\n\x20long-running\x20operation\x20pattern.\n\x20All\x20defaul\ - t\x20values\x20below\x20are\x20from\x20those\x20used\x20in\x20the\x20cli\ - ent\x20library\n\x20generators\x20(e.g.\n\x20[Java](https://github.com/g\ - oogleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c440\ - 4803/src/main/java/com/google/api/generator/gapic/composer/common/RetryS\ - ettingsComposer.java)).\n\n\r\n\x05\x04\x0b\x03\0\x01\x12\x04\xb6\x02\n\ - \x15\nk\n\x06\x04\x0b\x03\0\x02\0\x12\x04\xb9\x02\x044\x1a[\x20Initial\ - \x20delay\x20after\x20which\x20the\x20first\x20poll\x20request\x20will\ - \x20be\x20made.\n\x20Default\x20value:\x205\x20seconds.\n\n\x0f\n\x07\ - \x04\x0b\x03\0\x02\0\x06\x12\x04\xb9\x02\x04\x1c\n\x0f\n\x07\x04\x0b\x03\ - \0\x02\0\x01\x12\x04\xb9\x02\x1d/\n\x0f\n\x07\x04\x0b\x03\0\x02\0\x03\ - \x12\x04\xb9\x0223\n\x88\x01\n\x06\x04\x0b\x03\0\x02\x01\x12\x04\xbe\x02\ - \x04$\x1ax\x20Multiplier\x20to\x20gradually\x20increase\x20delay\x20betw\ - een\x20subsequent\x20polls\x20until\x20it\n\x20reaches\x20max_poll_delay\ - .\n\x20Default\x20value:\x201.5.\n\n\x0f\n\x07\x04\x0b\x03\0\x02\x01\x05\ - \x12\x04\xbe\x02\x04\t\n\x0f\n\x07\x04\x0b\x03\0\x02\x01\x01\x12\x04\xbe\ - \x02\n\x1f\n\x0f\n\x07\x04\x0b\x03\0\x02\x01\x03\x12\x04\xbe\x02\"#\n`\n\ - \x06\x04\x0b\x03\0\x02\x02\x12\x04\xc2\x02\x040\x1aP\x20Maximum\x20time\ - \x20between\x20two\x20subsequent\x20poll\x20requests.\n\x20Default\x20va\ - lue:\x2045\x20seconds.\n\n\x0f\n\x07\x04\x0b\x03\0\x02\x02\x06\x12\x04\ - \xc2\x02\x04\x1c\n\x0f\n\x07\x04\x0b\x03\0\x02\x02\x01\x12\x04\xc2\x02\ - \x1d+\n\x0f\n\x07\x04\x0b\x03\0\x02\x02\x03\x12\x04\xc2\x02./\nC\n\x06\ - \x04\x0b\x03\0\x02\x03\x12\x04\xc6\x02\x044\x1a3\x20Total\x20polling\x20\ - timeout.\n\x20Default\x20value:\x205\x20minutes.\n\n\x0f\n\x07\x04\x0b\ - \x03\0\x02\x03\x06\x12\x04\xc6\x02\x04\x1c\n\x0f\n\x07\x04\x0b\x03\0\x02\ - \x03\x01\x12\x04\xc6\x02\x1d/\n\x0f\n\x07\x04\x0b\x03\0\x02\x03\x03\x12\ - \x04\xc6\x0223\n\x92\x01\n\x04\x04\x0b\x02\0\x12\x04\xcb\x02\x02\x16\x1a\ - \x83\x01\x20The\x20fully\x20qualified\x20name\x20of\x20the\x20method,\ - \x20for\x20which\x20the\x20options\x20below\x20apply.\n\x20This\x20is\ - \x20used\x20to\x20find\x20the\x20method\x20to\x20apply\x20the\x20options\ - .\n\n\r\n\x05\x04\x0b\x02\0\x05\x12\x04\xcb\x02\x02\x08\n\r\n\x05\x04\ - \x0b\x02\0\x01\x12\x04\xcb\x02\t\x11\n\r\n\x05\x04\x0b\x02\0\x03\x12\x04\ - \xcb\x02\x14\x15\n\xc9\x04\n\x04\x04\x0b\x02\x01\x12\x04\xde\x02\x02\x1f\ - \x1a\xba\x04\x20Describes\x20settings\x20to\x20use\x20for\x20long-runnin\ - g\x20operations\x20when\x20generating\n\x20API\x20methods\x20for\x20RPCs\ - .\x20Complements\x20RPCs\x20that\x20use\x20the\x20annotations\x20in\n\ - \x20google/longrunning/operations.proto.\n\n\x20Example\x20of\x20a\x20YA\ - ML\x20configuration::\n\n\x20\x20publishing:\n\x20\x20\x20\x20method_set\ - tings:\n\x20\x20\x20\x20\x20\x20-\x20selector:\x20google.cloud.speech.v2\ - .Speech.BatchRecognize\n\x20\x20\x20\x20\x20\x20\x20\x20long_running:\n\ - \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20initial_poll_delay:\n\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20seconds:\x2060\x20#\x201\x20minu\ - te\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20poll_delay_multiplier:\x201.\ - 5\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20max_poll_delay:\n\x20\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20\x20\x20seconds:\x20360\x20#\x206\x20minutes\ - \n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_poll_timeout:\n\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20seconds:\x2054000\x20#\x2090\ - \x20minutes\n\n\r\n\x05\x04\x0b\x02\x01\x06\x12\x04\xde\x02\x02\r\n\r\n\ - \x05\x04\x0b\x02\x01\x01\x12\x04\xde\x02\x0e\x1a\n\r\n\x05\x04\x0b\x02\ - \x01\x03\x12\x04\xde\x02\x1d\x1e\n\x8f\x01\n\x02\x05\0\x12\x06\xe3\x02\0\ - \xfb\x02\x01\x1a\x80\x01\x20The\x20organization\x20for\x20which\x20the\ - \x20client\x20libraries\x20are\x20being\x20published.\n\x20Affects\x20th\ - e\x20url\x20where\x20generated\x20docs\x20are\x20published,\x20etc.\n\n\ - \x0b\n\x03\x05\0\x01\x12\x04\xe3\x02\x05\x1e\n\x1b\n\x04\x05\0\x02\0\x12\ - \x04\xe5\x02\x02.\x1a\r\x20Not\x20useful.\n\n\r\n\x05\x05\0\x02\0\x01\ - \x12\x04\xe5\x02\x02)\n\r\n\x05\x05\0\x02\0\x02\x12\x04\xe5\x02,-\n*\n\ - \x04\x05\0\x02\x01\x12\x04\xe8\x02\x02\x0c\x1a\x1c\x20Google\x20Cloud\ - \x20Platform\x20Org.\n\n\r\n\x05\x05\0\x02\x01\x01\x12\x04\xe8\x02\x02\ - \x07\n\r\n\x05\x05\0\x02\x01\x02\x12\x04\xe8\x02\n\x0b\n&\n\x04\x05\0\ - \x02\x02\x12\x04\xeb\x02\x02\n\x1a\x18\x20Ads\x20(Advertising)\x20Org.\n\ - \n\r\n\x05\x05\0\x02\x02\x01\x12\x04\xeb\x02\x02\x05\n\r\n\x05\x05\0\x02\ - \x02\x02\x12\x04\xeb\x02\x08\t\n\x1b\n\x04\x05\0\x02\x03\x12\x04\xee\x02\ - \x02\r\x1a\r\x20Photos\x20Org.\n\n\r\n\x05\x05\0\x02\x03\x01\x12\x04\xee\ - \x02\x02\x08\n\r\n\x05\x05\0\x02\x03\x02\x12\x04\xee\x02\x0b\x0c\n\x20\n\ - \x04\x05\0\x02\x04\x12\x04\xf1\x02\x02\x12\x1a\x12\x20Street\x20View\x20\ - Org.\n\n\r\n\x05\x05\0\x02\x04\x01\x12\x04\xf1\x02\x02\r\n\r\n\x05\x05\0\ - \x02\x04\x02\x12\x04\xf1\x02\x10\x11\n\x1d\n\x04\x05\0\x02\x05\x12\x04\ - \xf4\x02\x02\x0f\x1a\x0f\x20Shopping\x20Org.\n\n\r\n\x05\x05\0\x02\x05\ - \x01\x12\x04\xf4\x02\x02\n\n\r\n\x05\x05\0\x02\x05\x02\x12\x04\xf4\x02\r\ - \x0e\n\x18\n\x04\x05\0\x02\x06\x12\x04\xf7\x02\x02\n\x1a\n\x20Geo\x20Org\ - .\n\n\r\n\x05\x05\0\x02\x06\x01\x12\x04\xf7\x02\x02\x05\n\r\n\x05\x05\0\ - \x02\x06\x02\x12\x04\xf7\x02\x08\t\nF\n\x04\x05\0\x02\x07\x12\x04\xfa\ - \x02\x02\x14\x1a8\x20Generative\x20AI\x20-\x20https://developers.generat\ - iveai.google\n\n\r\n\x05\x05\0\x02\x07\x01\x12\x04\xfa\x02\x02\x0f\n\r\n\ - \x05\x05\0\x02\x07\x02\x12\x04\xfa\x02\x12\x13\n>\n\x02\x05\x01\x12\x06\ - \xfe\x02\0\x89\x03\x01\x1a0\x20To\x20where\x20should\x20client\x20librar\ - ies\x20be\x20published?\n\n\x0b\n\x03\x05\x01\x01\x12\x04\xfe\x02\x05\ - \x1d\n^\n\x04\x05\x01\x02\0\x12\x04\x81\x03\x02-\x1aP\x20Client\x20libra\ - ries\x20will\x20neither\x20be\x20generated\x20nor\x20published\x20to\x20\ - package\n\x20managers.\n\n\r\n\x05\x05\x01\x02\0\x01\x12\x04\x81\x03\x02\ - (\n\r\n\x05\x05\x01\x02\0\x02\x12\x04\x81\x03+,\n}\n\x04\x05\x01\x02\x01\ - \x12\x04\x85\x03\x02\x0e\x1ao\x20Generate\x20the\x20client\x20library\ - \x20in\x20a\x20repo\x20under\x20github.com/googleapis,\n\x20but\x20don't\ - \x20publish\x20it\x20to\x20package\x20managers.\n\n\r\n\x05\x05\x01\x02\ - \x01\x01\x12\x04\x85\x03\x02\x08\n\r\n\x05\x05\x01\x02\x01\x02\x12\x04\ - \x85\x03\x0b\r\nU\n\x04\x05\x01\x02\x02\x12\x04\x88\x03\x02\x17\x1aG\x20\ - Publish\x20the\x20library\x20to\x20package\x20managers\x20like\x20nuget.\ - org\x20and\x20npmjs.com.\n\n\r\n\x05\x05\x01\x02\x02\x01\x12\x04\x88\x03\ - \x02\x11\n\r\n\x05\x05\x01\x02\x02\x02\x12\x04\x88\x03\x14\x16b\x06proto\ - 3\ + ocs/reference/rpc\n\n\r\n\x05\x04\x02\x02\t\x05\x12\x04\xd4\x01\x02\x08\ + \n\r\n\x05\x04\x02\x02\t\x01\x12\x04\xd4\x01\t*\n\r\n\x05\x04\x02\x02\t\ + \x03\x12\x04\xd4\x01-0\n\x82\x01\n\x04\x04\x02\x02\n\x12\x04\xd8\x01\x02\ + 0\x1at\x20Optional\x20link\x20to\x20REST\x20reference\x20documentation.\ + \x20\x20Example:\n\x20https://cloud.google.com/pubsub/lite/docs/referenc\ + e/rest\n\n\r\n\x05\x04\x02\x02\n\x05\x12\x04\xd8\x01\x02\x08\n\r\n\x05\ + \x04\x02\x02\n\x01\x12\x04\xd8\x01\t)\n\r\n\x05\x04\x02\x02\n\x03\x12\ + \x04\xd8\x01,/\n3\n\x02\x04\x03\x12\x06\xdc\x01\0\xfc\x01\x01\x1a%\x20Se\ + ttings\x20for\x20Java\x20client\x20libraries.\n\n\x0b\n\x03\x04\x03\x01\ + \x12\x04\xdc\x01\x08\x14\n\xa1\x03\n\x04\x04\x03\x02\0\x12\x04\xe8\x01\ + \x02\x1d\x1a\x92\x03\x20The\x20package\x20name\x20to\x20use\x20in\x20Jav\ + a.\x20Clobbers\x20the\x20java_package\x20option\n\x20set\x20in\x20the\ + \x20protobuf.\x20This\x20should\x20be\x20used\x20**only**\x20by\x20APIs\ + \n\x20who\x20have\x20already\x20set\x20the\x20language_settings.java.pac\ + kage_name\"\x20field\n\x20in\x20gapic.yaml.\x20API\x20teams\x20should\ + \x20use\x20the\x20protobuf\x20java_package\x20option\n\x20where\x20possi\ + ble.\n\n\x20Example\x20of\x20a\x20YAML\x20configuration::\n\n\x20\x20pub\ + lishing:\n\x20\x20\x20\x20java_settings:\n\x20\x20\x20\x20\x20\x20librar\ + y_package:\x20com.google.cloud.pubsub.v1\n\n\r\n\x05\x04\x03\x02\0\x05\ + \x12\x04\xe8\x01\x02\x08\n\r\n\x05\x04\x03\x02\0\x01\x12\x04\xe8\x01\t\ + \x18\n\r\n\x05\x04\x03\x02\0\x03\x12\x04\xe8\x01\x1b\x1c\n\xb6\x04\n\x04\ + \x04\x03\x02\x01\x12\x04\xf8\x01\x02.\x1a\xa7\x04\x20Configure\x20the\ + \x20Java\x20class\x20name\x20to\x20use\x20instead\x20of\x20the\x20servic\ + e's\x20for\x20its\n\x20corresponding\x20generated\x20GAPIC\x20client.\ + \x20Keys\x20are\x20fully-qualified\n\x20service\x20names\x20as\x20they\ + \x20appear\x20in\x20the\x20protobuf\x20(including\x20the\x20full\n\x20th\ + e\x20language_settings.java.interface_names\"\x20field\x20in\x20gapic.ya\ + ml.\x20API\n\x20teams\x20should\x20otherwise\x20use\x20the\x20service\ + \x20name\x20as\x20it\x20appears\x20in\x20the\n\x20protobuf.\n\n\x20Examp\ + le\x20of\x20a\x20YAML\x20configuration::\n\n\x20\x20publishing:\n\x20\ + \x20\x20\x20java_settings:\n\x20\x20\x20\x20\x20\x20service_class_names:\ + \n\x20\x20\x20\x20\x20\x20\x20\x20-\x20google.pubsub.v1.Publisher:\x20To\ + picAdmin\n\x20\x20\x20\x20\x20\x20\x20\x20-\x20google.pubsub.v1.Subscrib\ + er:\x20SubscriptionAdmin\n\n\r\n\x05\x04\x03\x02\x01\x06\x12\x04\xf8\x01\ + \x02\x15\n\r\n\x05\x04\x03\x02\x01\x01\x12\x04\xf8\x01\x16)\n\r\n\x05\ + \x04\x03\x02\x01\x03\x12\x04\xf8\x01,-\n\x1e\n\x04\x04\x03\x02\x02\x12\ + \x04\xfb\x01\x02$\x1a\x10\x20Some\x20settings.\n\n\r\n\x05\x04\x03\x02\ + \x02\x06\x12\x04\xfb\x01\x02\x18\n\r\n\x05\x04\x03\x02\x02\x01\x12\x04\ + \xfb\x01\x19\x1f\n\r\n\x05\x04\x03\x02\x02\x03\x12\x04\xfb\x01\"#\n2\n\ + \x02\x04\x04\x12\x06\xff\x01\0\x82\x02\x01\x1a$\x20Settings\x20for\x20C+\ + +\x20client\x20libraries.\n\n\x0b\n\x03\x04\x04\x01\x12\x04\xff\x01\x08\ + \x13\n\x1e\n\x04\x04\x04\x02\0\x12\x04\x81\x02\x02$\x1a\x10\x20Some\x20s\ + ettings.\n\n\r\n\x05\x04\x04\x02\0\x06\x12\x04\x81\x02\x02\x18\n\r\n\x05\ + \x04\x04\x02\0\x01\x12\x04\x81\x02\x19\x1f\n\r\n\x05\x04\x04\x02\0\x03\ + \x12\x04\x81\x02\"#\n2\n\x02\x04\x05\x12\x06\x85\x02\0\x88\x02\x01\x1a$\ + \x20Settings\x20for\x20Php\x20client\x20libraries.\n\n\x0b\n\x03\x04\x05\ + \x01\x12\x04\x85\x02\x08\x13\n\x1e\n\x04\x04\x05\x02\0\x12\x04\x87\x02\ + \x02$\x1a\x10\x20Some\x20settings.\n\n\r\n\x05\x04\x05\x02\0\x06\x12\x04\ + \x87\x02\x02\x18\n\r\n\x05\x04\x05\x02\0\x01\x12\x04\x87\x02\x19\x1f\n\r\ + \n\x05\x04\x05\x02\0\x03\x12\x04\x87\x02\"#\n5\n\x02\x04\x06\x12\x06\x8b\ + \x02\0\x9c\x02\x01\x1a'\x20Settings\x20for\x20Python\x20client\x20librar\ + ies.\n\n\x0b\n\x03\x04\x06\x01\x12\x04\x8b\x02\x08\x16\n\xb1\x01\n\x04\ + \x04\x06\x03\0\x12\x06\x8f\x02\x02\x95\x02\x03\x1a\xa0\x01\x20Experiment\ + al\x20features\x20to\x20be\x20included\x20during\x20client\x20library\ + \x20generation.\n\x20These\x20fields\x20will\x20be\x20deprecated\x20once\ + \x20the\x20feature\x20graduates\x20and\x20is\x20enabled\n\x20by\x20defau\ + lt.\n\n\r\n\x05\x04\x06\x03\0\x01\x12\x04\x8f\x02\n\x1e\n\x83\x02\n\x06\ + \x04\x06\x03\0\x02\0\x12\x04\x94\x02\x04#\x1a\xf2\x01\x20Enables\x20gene\ + ration\x20of\x20asynchronous\x20REST\x20clients\x20if\x20`rest`\x20trans\ + port\x20is\n\x20enabled.\x20By\x20default,\x20asynchronous\x20REST\x20cl\ + ients\x20will\x20not\x20be\x20generated.\n\x20This\x20feature\x20will\ + \x20be\x20enabled\x20by\x20default\x201\x20month\x20after\x20launching\ + \x20the\n\x20feature\x20in\x20preview\x20packages.\n\n\x0f\n\x07\x04\x06\ + \x03\0\x02\0\x05\x12\x04\x94\x02\x04\x08\n\x0f\n\x07\x04\x06\x03\0\x02\0\ + \x01\x12\x04\x94\x02\t\x1e\n\x0f\n\x07\x04\x06\x03\0\x02\0\x03\x12\x04\ + \x94\x02!\"\n\x1e\n\x04\x04\x06\x02\0\x12\x04\x98\x02\x02$\x1a\x10\x20So\ + me\x20settings.\n\n\r\n\x05\x04\x06\x02\0\x06\x12\x04\x98\x02\x02\x18\n\ + \r\n\x05\x04\x06\x02\0\x01\x12\x04\x98\x02\x19\x1f\n\r\n\x05\x04\x06\x02\ + \0\x03\x12\x04\x98\x02\"#\nV\n\x04\x04\x06\x02\x01\x12\x04\x9b\x02\x021\ + \x1aH\x20Experimental\x20features\x20to\x20be\x20included\x20during\x20c\ + lient\x20library\x20generation.\n\n\r\n\x05\x04\x06\x02\x01\x06\x12\x04\ + \x9b\x02\x02\x16\n\r\n\x05\x04\x06\x02\x01\x01\x12\x04\x9b\x02\x17,\n\r\ + \n\x05\x04\x06\x02\x01\x03\x12\x04\x9b\x02/0\n3\n\x02\x04\x07\x12\x06\ + \x9f\x02\0\xa2\x02\x01\x1a%\x20Settings\x20for\x20Node\x20client\x20libr\ + aries.\n\n\x0b\n\x03\x04\x07\x01\x12\x04\x9f\x02\x08\x14\n\x1e\n\x04\x04\ + \x07\x02\0\x12\x04\xa1\x02\x02$\x1a\x10\x20Some\x20settings.\n\n\r\n\x05\ + \x04\x07\x02\0\x06\x12\x04\xa1\x02\x02\x18\n\r\n\x05\x04\x07\x02\0\x01\ + \x12\x04\xa1\x02\x19\x1f\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\xa1\x02\"#\ + \n5\n\x02\x04\x08\x12\x06\xa5\x02\0\xc6\x02\x01\x1a'\x20Settings\x20for\ + \x20Dotnet\x20client\x20libraries.\n\n\x0b\n\x03\x04\x08\x01\x12\x04\xa5\ + \x02\x08\x16\n\x1e\n\x04\x04\x08\x02\0\x12\x04\xa7\x02\x02$\x1a\x10\x20S\ + ome\x20settings.\n\n\r\n\x05\x04\x08\x02\0\x06\x12\x04\xa7\x02\x02\x18\n\ + \r\n\x05\x04\x08\x02\0\x01\x12\x04\xa7\x02\x19\x1f\n\r\n\x05\x04\x08\x02\ + \0\x03\x12\x04\xa7\x02\"#\n\xe6\x01\n\x04\x04\x08\x02\x01\x12\x04\xae\ + \x02\x02+\x1a\xd7\x01\x20Map\x20from\x20original\x20service\x20names\x20\ + to\x20renamed\x20versions.\n\x20This\x20is\x20used\x20when\x20the\x20def\ + ault\x20generated\x20types\n\x20would\x20cause\x20a\x20naming\x20conflic\ + t.\x20(Neither\x20name\x20is\n\x20fully-qualified.)\n\x20Example:\x20Sub\ + scriber\x20to\x20SubscriberServiceApi.\n\n\r\n\x05\x04\x08\x02\x01\x06\ + \x12\x04\xae\x02\x02\x15\n\r\n\x05\x04\x08\x02\x01\x01\x12\x04\xae\x02\ + \x16&\n\r\n\x05\x04\x08\x02\x01\x03\x12\x04\xae\x02)*\n\x8d\x02\n\x04\ + \x04\x08\x02\x02\x12\x04\xb5\x02\x02,\x1a\xfe\x01\x20Map\x20from\x20full\ + \x20resource\x20types\x20to\x20the\x20effective\x20short\x20name\n\x20fo\ + r\x20the\x20resource.\x20This\x20is\x20used\x20when\x20otherwise\x20reso\ + urce\n\x20named\x20from\x20different\x20services\x20would\x20cause\x20na\ + ming\x20collisions.\n\x20Example\x20entry:\n\x20\"datalabeling.googleapi\ + s.com/Dataset\":\x20\"DataLabelingDataset\"\n\n\r\n\x05\x04\x08\x02\x02\ + \x06\x12\x04\xb5\x02\x02\x15\n\r\n\x05\x04\x08\x02\x02\x01\x12\x04\xb5\ + \x02\x16'\n\r\n\x05\x04\x08\x02\x02\x03\x12\x04\xb5\x02*+\n\x9e\x02\n\ + \x04\x04\x08\x02\x03\x12\x04\xbc\x02\x02(\x1a\x8f\x02\x20List\x20of\x20f\ + ull\x20resource\x20types\x20to\x20ignore\x20during\x20generation.\n\x20T\ + his\x20is\x20typically\x20used\x20for\x20API-specific\x20Location\x20res\ + ources,\n\x20which\x20should\x20be\x20handled\x20by\x20the\x20generator\ + \x20as\x20if\x20they\x20were\x20actually\n\x20the\x20common\x20Location\ + \x20resources.\n\x20Example\x20entry:\x20\"documentai.googleapis.com/Loc\ + ation\"\n\n\r\n\x05\x04\x08\x02\x03\x04\x12\x04\xbc\x02\x02\n\n\r\n\x05\ + \x04\x08\x02\x03\x05\x12\x04\xbc\x02\x0b\x11\n\r\n\x05\x04\x08\x02\x03\ + \x01\x12\x04\xbc\x02\x12#\n\r\n\x05\x04\x08\x02\x03\x03\x12\x04\xbc\x02&\ + '\n}\n\x04\x04\x08\x02\x04\x12\x04\xc0\x02\x02/\x1ao\x20Namespaces\x20wh\ + ich\x20must\x20be\x20aliased\x20in\x20snippets\x20due\x20to\n\x20a\x20kn\ + own\x20(but\x20non-generator-predictable)\x20naming\x20collision\n\n\r\n\ + \x05\x04\x08\x02\x04\x04\x12\x04\xc0\x02\x02\n\n\r\n\x05\x04\x08\x02\x04\ + \x05\x12\x04\xc0\x02\x0b\x11\n\r\n\x05\x04\x08\x02\x04\x01\x12\x04\xc0\ + \x02\x12*\n\r\n\x05\x04\x08\x02\x04\x03\x12\x04\xc0\x02-.\n\xc7\x01\n\ + \x04\x04\x08\x02\x05\x12\x04\xc5\x02\x02-\x1a\xb8\x01\x20Method\x20signa\ + tures\x20(in\x20the\x20form\x20\"service.method(signature)\")\n\x20which\ + \x20are\x20provided\x20separately,\x20so\x20shouldn't\x20be\x20generated\ + .\n\x20Snippets\x20*calling*\x20these\x20methods\x20are\x20still\x20gene\ + rated,\x20however.\n\n\r\n\x05\x04\x08\x02\x05\x04\x12\x04\xc5\x02\x02\n\ + \n\r\n\x05\x04\x08\x02\x05\x05\x12\x04\xc5\x02\x0b\x11\n\r\n\x05\x04\x08\ + \x02\x05\x01\x12\x04\xc5\x02\x12(\n\r\n\x05\x04\x08\x02\x05\x03\x12\x04\ + \xc5\x02+,\n3\n\x02\x04\t\x12\x06\xc9\x02\0\xcc\x02\x01\x1a%\x20Settings\ + \x20for\x20Ruby\x20client\x20libraries.\n\n\x0b\n\x03\x04\t\x01\x12\x04\ + \xc9\x02\x08\x14\n\x1e\n\x04\x04\t\x02\0\x12\x04\xcb\x02\x02$\x1a\x10\ + \x20Some\x20settings.\n\n\r\n\x05\x04\t\x02\0\x06\x12\x04\xcb\x02\x02\ + \x18\n\r\n\x05\x04\t\x02\0\x01\x12\x04\xcb\x02\x19\x1f\n\r\n\x05\x04\t\ + \x02\0\x03\x12\x04\xcb\x02\"#\n1\n\x02\x04\n\x12\x06\xcf\x02\0\xd2\x02\ + \x01\x1a#\x20Settings\x20for\x20Go\x20client\x20libraries.\n\n\x0b\n\x03\ + \x04\n\x01\x12\x04\xcf\x02\x08\x12\n\x1e\n\x04\x04\n\x02\0\x12\x04\xd1\ + \x02\x02$\x1a\x10\x20Some\x20settings.\n\n\r\n\x05\x04\n\x02\0\x06\x12\ + \x04\xd1\x02\x02\x18\n\r\n\x05\x04\n\x02\0\x01\x12\x04\xd1\x02\x19\x1f\n\ + \r\n\x05\x04\n\x02\0\x03\x12\x04\xd1\x02\"#\nC\n\x02\x04\x0b\x12\x06\xd5\ + \x02\0\x95\x03\x01\x1a5\x20Describes\x20the\x20generator\x20configuratio\ + n\x20for\x20a\x20method.\n\n\x0b\n\x03\x04\x0b\x01\x12\x04\xd5\x02\x08\ + \x16\n\x90\x03\n\x04\x04\x0b\x03\0\x12\x06\xdb\x02\x02\xec\x02\x03\x1a\ + \xff\x02\x20Describes\x20settings\x20to\x20use\x20when\x20generating\x20\ + API\x20methods\x20that\x20use\x20the\n\x20long-running\x20operation\x20p\ + attern.\n\x20All\x20default\x20values\x20below\x20are\x20from\x20those\ + \x20used\x20in\x20the\x20client\x20library\n\x20generators\x20(e.g.\n\ + \x20[Java](https://github.com/googleapis/gapic-generator-java/blob/04c2f\ + aa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generat\ + or/gapic/composer/common/RetrySettingsComposer.java)).\n\n\r\n\x05\x04\ + \x0b\x03\0\x01\x12\x04\xdb\x02\n\x15\nk\n\x06\x04\x0b\x03\0\x02\0\x12\ + \x04\xde\x02\x044\x1a[\x20Initial\x20delay\x20after\x20which\x20the\x20f\ + irst\x20poll\x20request\x20will\x20be\x20made.\n\x20Default\x20value:\ + \x205\x20seconds.\n\n\x0f\n\x07\x04\x0b\x03\0\x02\0\x06\x12\x04\xde\x02\ + \x04\x1c\n\x0f\n\x07\x04\x0b\x03\0\x02\0\x01\x12\x04\xde\x02\x1d/\n\x0f\ + \n\x07\x04\x0b\x03\0\x02\0\x03\x12\x04\xde\x0223\n\x88\x01\n\x06\x04\x0b\ + \x03\0\x02\x01\x12\x04\xe3\x02\x04$\x1ax\x20Multiplier\x20to\x20graduall\ + y\x20increase\x20delay\x20between\x20subsequent\x20polls\x20until\x20it\ + \n\x20reaches\x20max_poll_delay.\n\x20Default\x20value:\x201.5.\n\n\x0f\ + \n\x07\x04\x0b\x03\0\x02\x01\x05\x12\x04\xe3\x02\x04\t\n\x0f\n\x07\x04\ + \x0b\x03\0\x02\x01\x01\x12\x04\xe3\x02\n\x1f\n\x0f\n\x07\x04\x0b\x03\0\ + \x02\x01\x03\x12\x04\xe3\x02\"#\n`\n\x06\x04\x0b\x03\0\x02\x02\x12\x04\ + \xe7\x02\x040\x1aP\x20Maximum\x20time\x20between\x20two\x20subsequent\ + \x20poll\x20requests.\n\x20Default\x20value:\x2045\x20seconds.\n\n\x0f\n\ + \x07\x04\x0b\x03\0\x02\x02\x06\x12\x04\xe7\x02\x04\x1c\n\x0f\n\x07\x04\ + \x0b\x03\0\x02\x02\x01\x12\x04\xe7\x02\x1d+\n\x0f\n\x07\x04\x0b\x03\0\ + \x02\x02\x03\x12\x04\xe7\x02./\nC\n\x06\x04\x0b\x03\0\x02\x03\x12\x04\ + \xeb\x02\x044\x1a3\x20Total\x20polling\x20timeout.\n\x20Default\x20value\ + :\x205\x20minutes.\n\n\x0f\n\x07\x04\x0b\x03\0\x02\x03\x06\x12\x04\xeb\ + \x02\x04\x1c\n\x0f\n\x07\x04\x0b\x03\0\x02\x03\x01\x12\x04\xeb\x02\x1d/\ + \n\x0f\n\x07\x04\x0b\x03\0\x02\x03\x03\x12\x04\xeb\x0223\n\xbb\x02\n\x04\ + \x04\x0b\x02\0\x12\x04\xf7\x02\x02\x16\x1a\xac\x02\x20The\x20fully\x20qu\ + alified\x20name\x20of\x20the\x20method,\x20for\x20which\x20the\x20option\ + s\x20below\x20apply.\n\x20This\x20is\x20used\x20to\x20find\x20the\x20met\ + hod\x20to\x20apply\x20the\x20options.\n\n\x20Example:\n\n\x20\x20\x20\ + \x20publishing:\n\x20\x20\x20\x20\x20\x20method_settings:\n\x20\x20\x20\ + \x20\x20\x20-\x20selector:\x20google.storage.control.v2.StorageControl.C\ + reateFolder\n\x20\x20\x20\x20\x20\x20\x20\x20#\x20method\x20settings\x20\ + for\x20CreateFolder...\n\n\r\n\x05\x04\x0b\x02\0\x05\x12\x04\xf7\x02\x02\ + \x08\n\r\n\x05\x04\x0b\x02\0\x01\x12\x04\xf7\x02\t\x11\n\r\n\x05\x04\x0b\ + \x02\0\x03\x12\x04\xf7\x02\x14\x15\n\x90\x04\n\x04\x04\x0b\x02\x01\x12\ + \x04\x87\x03\x02\x1f\x1a\x81\x04\x20Describes\x20settings\x20to\x20use\ + \x20for\x20long-running\x20operations\x20when\x20generating\n\x20API\x20\ + methods\x20for\x20RPCs.\x20Complements\x20RPCs\x20that\x20use\x20the\x20\ + annotations\x20in\n\x20google/longrunning/operations.proto.\n\n\x20Examp\ + le\x20of\x20a\x20YAML\x20configuration::\n\n\x20\x20\x20\x20publishing:\ + \n\x20\x20\x20\x20\x20\x20method_settings:\n\x20\x20\x20\x20\x20\x20-\ + \x20selector:\x20google.cloud.speech.v2.Speech.BatchRecognize\n\x20\x20\ + \x20\x20\x20\x20\x20\x20long_running:\n\x20\x20\x20\x20\x20\x20\x20\x20\ + \x20\x20initial_poll_delay:\x2060s\x20#\x201\x20minute\n\x20\x20\x20\x20\ + \x20\x20\x20\x20\x20\x20poll_delay_multiplier:\x201.5\n\x20\x20\x20\x20\ + \x20\x20\x20\x20\x20\x20max_poll_delay:\x20360s\x20#\x206\x20minutes\n\ + \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20total_poll_timeout:\x2054000s\ + \x20#\x2090\x20minutes\n\n\r\n\x05\x04\x0b\x02\x01\x06\x12\x04\x87\x03\ + \x02\r\n\r\n\x05\x04\x0b\x02\x01\x01\x12\x04\x87\x03\x0e\x1a\n\r\n\x05\ + \x04\x0b\x02\x01\x03\x12\x04\x87\x03\x1d\x1e\n\x94\x03\n\x04\x04\x0b\x02\ + \x02\x12\x04\x94\x03\x02,\x1a\x85\x03\x20List\x20of\x20top-level\x20fiel\ + ds\x20of\x20the\x20request\x20message,\x20that\x20should\x20be\n\x20auto\ + matically\x20populated\x20by\x20the\x20client\x20libraries\x20based\x20o\ + n\x20their\n\x20(google.api.field_info).format.\x20Currently\x20supporte\ + d\x20format:\x20UUID4.\n\n\x20Example\x20of\x20a\x20YAML\x20configuratio\ + n:\n\n\x20\x20\x20\x20publishing:\n\x20\x20\x20\x20\x20\x20method_settin\ + gs:\n\x20\x20\x20\x20\x20\x20-\x20selector:\x20google.example.v1.Example\ + Service.CreateExample\n\x20\x20\x20\x20\x20\x20\x20\x20auto_populated_fi\ + elds:\n\x20\x20\x20\x20\x20\x20\x20\x20-\x20request_id\n\n\r\n\x05\x04\ + \x0b\x02\x02\x04\x12\x04\x94\x03\x02\n\n\r\n\x05\x04\x0b\x02\x02\x05\x12\ + \x04\x94\x03\x0b\x11\n\r\n\x05\x04\x0b\x02\x02\x01\x12\x04\x94\x03\x12'\ + \n\r\n\x05\x04\x0b\x02\x02\x03\x12\x04\x94\x03*+\n\x8f\x01\n\x02\x05\0\ + \x12\x06\x99\x03\0\xb1\x03\x01\x1a\x80\x01\x20The\x20organization\x20for\ + \x20which\x20the\x20client\x20libraries\x20are\x20being\x20published.\n\ + \x20Affects\x20the\x20url\x20where\x20generated\x20docs\x20are\x20publis\ + hed,\x20etc.\n\n\x0b\n\x03\x05\0\x01\x12\x04\x99\x03\x05\x1e\n\x1b\n\x04\ + \x05\0\x02\0\x12\x04\x9b\x03\x02.\x1a\r\x20Not\x20useful.\n\n\r\n\x05\ + \x05\0\x02\0\x01\x12\x04\x9b\x03\x02)\n\r\n\x05\x05\0\x02\0\x02\x12\x04\ + \x9b\x03,-\n*\n\x04\x05\0\x02\x01\x12\x04\x9e\x03\x02\x0c\x1a\x1c\x20Goo\ + gle\x20Cloud\x20Platform\x20Org.\n\n\r\n\x05\x05\0\x02\x01\x01\x12\x04\ + \x9e\x03\x02\x07\n\r\n\x05\x05\0\x02\x01\x02\x12\x04\x9e\x03\n\x0b\n&\n\ + \x04\x05\0\x02\x02\x12\x04\xa1\x03\x02\n\x1a\x18\x20Ads\x20(Advertising)\ + \x20Org.\n\n\r\n\x05\x05\0\x02\x02\x01\x12\x04\xa1\x03\x02\x05\n\r\n\x05\ + \x05\0\x02\x02\x02\x12\x04\xa1\x03\x08\t\n\x1b\n\x04\x05\0\x02\x03\x12\ + \x04\xa4\x03\x02\r\x1a\r\x20Photos\x20Org.\n\n\r\n\x05\x05\0\x02\x03\x01\ + \x12\x04\xa4\x03\x02\x08\n\r\n\x05\x05\0\x02\x03\x02\x12\x04\xa4\x03\x0b\ + \x0c\n\x20\n\x04\x05\0\x02\x04\x12\x04\xa7\x03\x02\x12\x1a\x12\x20Street\ + \x20View\x20Org.\n\n\r\n\x05\x05\0\x02\x04\x01\x12\x04\xa7\x03\x02\r\n\r\ + \n\x05\x05\0\x02\x04\x02\x12\x04\xa7\x03\x10\x11\n\x1d\n\x04\x05\0\x02\ + \x05\x12\x04\xaa\x03\x02\x0f\x1a\x0f\x20Shopping\x20Org.\n\n\r\n\x05\x05\ + \0\x02\x05\x01\x12\x04\xaa\x03\x02\n\n\r\n\x05\x05\0\x02\x05\x02\x12\x04\ + \xaa\x03\r\x0e\n\x18\n\x04\x05\0\x02\x06\x12\x04\xad\x03\x02\n\x1a\n\x20\ + Geo\x20Org.\n\n\r\n\x05\x05\0\x02\x06\x01\x12\x04\xad\x03\x02\x05\n\r\n\ + \x05\x05\0\x02\x06\x02\x12\x04\xad\x03\x08\t\nF\n\x04\x05\0\x02\x07\x12\ + \x04\xb0\x03\x02\x14\x1a8\x20Generative\x20AI\x20-\x20https://developers\ + .generativeai.google\n\n\r\n\x05\x05\0\x02\x07\x01\x12\x04\xb0\x03\x02\ + \x0f\n\r\n\x05\x05\0\x02\x07\x02\x12\x04\xb0\x03\x12\x13\n>\n\x02\x05\ + \x01\x12\x06\xb4\x03\0\xbf\x03\x01\x1a0\x20To\x20where\x20should\x20clie\ + nt\x20libraries\x20be\x20published?\n\n\x0b\n\x03\x05\x01\x01\x12\x04\ + \xb4\x03\x05\x1d\n^\n\x04\x05\x01\x02\0\x12\x04\xb7\x03\x02-\x1aP\x20Cli\ + ent\x20libraries\x20will\x20neither\x20be\x20generated\x20nor\x20publish\ + ed\x20to\x20package\n\x20managers.\n\n\r\n\x05\x05\x01\x02\0\x01\x12\x04\ + \xb7\x03\x02(\n\r\n\x05\x05\x01\x02\0\x02\x12\x04\xb7\x03+,\n}\n\x04\x05\ + \x01\x02\x01\x12\x04\xbb\x03\x02\x0e\x1ao\x20Generate\x20the\x20client\ + \x20library\x20in\x20a\x20repo\x20under\x20github.com/googleapis,\n\x20b\ + ut\x20don't\x20publish\x20it\x20to\x20package\x20managers.\n\n\r\n\x05\ + \x05\x01\x02\x01\x01\x12\x04\xbb\x03\x02\x08\n\r\n\x05\x05\x01\x02\x01\ + \x02\x12\x04\xbb\x03\x0b\r\nU\n\x04\x05\x01\x02\x02\x12\x04\xbe\x03\x02\ + \x17\x1aG\x20Publish\x20the\x20library\x20to\x20package\x20managers\x20l\ + ike\x20nuget.org\x20and\x20npmjs.com.\n\n\r\n\x05\x05\x01\x02\x02\x01\ + \x12\x04\xbe\x03\x02\x11\n\r\n\x05\x05\x01\x02\x02\x02\x12\x04\xbe\x03\ + \x14\x16\n|\n\x02\x04\x0c\x12\x06\xc3\x03\0\xc7\x03\x01\x1an\x20This\x20\ + message\x20is\x20used\x20to\x20configure\x20the\x20generation\x20of\x20a\ + \x20subset\x20of\x20the\x20RPCs\x20in\n\x20a\x20service\x20for\x20client\ + \x20libraries.\n\n\x0b\n\x03\x04\x0c\x01\x12\x04\xc3\x03\x08\x20\nu\n\ + \x04\x04\x0c\x02\0\x12\x04\xc6\x03\x02\x1e\x1ag\x20An\x20allowlist\x20of\ + \x20the\x20fully\x20qualified\x20names\x20of\x20RPCs\x20that\x20should\ + \x20be\x20included\n\x20on\x20public\x20client\x20surfaces.\n\n\r\n\x05\ + \x04\x0c\x02\0\x04\x12\x04\xc6\x03\x02\n\n\r\n\x05\x04\x0c\x02\0\x05\x12\ + \x04\xc6\x03\x0b\x11\n\r\n\x05\x04\x0c\x02\0\x01\x12\x04\xc6\x03\x12\x19\ + \n\r\n\x05\x04\x0c\x02\0\x03\x12\x04\xc6\x03\x1c\x1db\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(3); + deps.push(super::launch_stage::file_descriptor().clone()); + deps.push(::protobuf::descriptor::file_descriptor().clone()); + deps.push(::protobuf::well_known_types::duration::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(15); + messages.push(CommonLanguageSettings::generated_message_descriptor_data()); + messages.push(ClientLibrarySettings::generated_message_descriptor_data()); + messages.push(Publishing::generated_message_descriptor_data()); + messages.push(JavaSettings::generated_message_descriptor_data()); + messages.push(CppSettings::generated_message_descriptor_data()); + messages.push(PhpSettings::generated_message_descriptor_data()); + messages.push(PythonSettings::generated_message_descriptor_data()); + messages.push(NodeSettings::generated_message_descriptor_data()); + messages.push(DotnetSettings::generated_message_descriptor_data()); + messages.push(RubySettings::generated_message_descriptor_data()); + messages.push(GoSettings::generated_message_descriptor_data()); + messages.push(MethodSettings::generated_message_descriptor_data()); + messages.push(SelectiveGapicGeneration::generated_message_descriptor_data()); + messages.push(python_settings::ExperimentalFeatures::generated_message_descriptor_data()); + messages.push(method_settings::LongRunning::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(2); + enums.push(ClientLibraryOrganization::generated_enum_descriptor_data()); + enums.push(ClientLibraryDestination::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/config_change.rs b/googleapis-raw/src/api/config_change.rs index bf0be97..5121be1 100644 --- a/googleapis-raw/src/api/config_change.rs +++ b/googleapis-raw/src/api/config_change.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,32 +9,61 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/config_change.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default)] +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; + +/// Output generated from semantically comparing two versions of a service +/// configuration. +/// +/// Includes detailed information about a field that have changed with +/// applicable advice about potential consequences for the change, such as +/// backwards-incompatibility. +// @@protoc_insertion_point(message:google.api.ConfigChange) +#[derive(PartialEq,Clone,Default,Debug)] pub struct ConfigChange { // message fields + /// Object hierarchy path to the change, with levels separated by a '.' + /// character. For repeated fields, an applicable unique identifier field is + /// used for the index (usually selector, name, or id). For maps, the term + /// 'key' is used. If the field has no unique identifier, the numeric index + /// is used. + /// Examples: + /// - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction + /// - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value + /// - logging.producer_destinations[0] + // @@protoc_insertion_point(field:google.api.ConfigChange.element) pub element: ::std::string::String, + /// Value of the changed object in the old Service configuration, + /// in JSON format. This field will not be populated if ChangeType == ADDED. + // @@protoc_insertion_point(field:google.api.ConfigChange.old_value) pub old_value: ::std::string::String, + /// Value of the changed object in the new Service configuration, + /// in JSON format. This field will not be populated if ChangeType == REMOVED. + // @@protoc_insertion_point(field:google.api.ConfigChange.new_value) pub new_value: ::std::string::String, - pub change_type: ChangeType, - pub advices: ::protobuf::RepeatedField, + /// The type for this change, either ADDED, REMOVED, or MODIFIED. + // @@protoc_insertion_point(field:google.api.ConfigChange.change_type) + pub change_type: ::protobuf::EnumOrUnknown, + /// Collection of advice provided for this change, useful for determining the + /// possible impact of this change. + // @@protoc_insertion_point(field:google.api.ConfigChange.advices) + pub advices: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.ConfigChange.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ConfigChange { @@ -47,156 +77,69 @@ impl ConfigChange { ::std::default::Default::default() } - // string element = 1; - - - pub fn get_element(&self) -> &str { - &self.element - } - pub fn clear_element(&mut self) { - self.element.clear(); - } - - // Param is passed by value, moved - pub fn set_element(&mut self, v: ::std::string::String) { - self.element = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_element(&mut self) -> &mut ::std::string::String { - &mut self.element - } - - // Take field - pub fn take_element(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.element, ::std::string::String::new()) - } - - // string old_value = 2; - - - pub fn get_old_value(&self) -> &str { - &self.old_value - } - pub fn clear_old_value(&mut self) { - self.old_value.clear(); - } - - // Param is passed by value, moved - pub fn set_old_value(&mut self, v: ::std::string::String) { - self.old_value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_old_value(&mut self) -> &mut ::std::string::String { - &mut self.old_value - } - - // Take field - pub fn take_old_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.old_value, ::std::string::String::new()) - } - - // string new_value = 3; - - - pub fn get_new_value(&self) -> &str { - &self.new_value - } - pub fn clear_new_value(&mut self) { - self.new_value.clear(); - } - - // Param is passed by value, moved - pub fn set_new_value(&mut self, v: ::std::string::String) { - self.new_value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_new_value(&mut self) -> &mut ::std::string::String { - &mut self.new_value - } - - // Take field - pub fn take_new_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.new_value, ::std::string::String::new()) - } - - // .google.api.ChangeType change_type = 4; - - - pub fn get_change_type(&self) -> ChangeType { - self.change_type - } - pub fn clear_change_type(&mut self) { - self.change_type = ChangeType::CHANGE_TYPE_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_change_type(&mut self, v: ChangeType) { - self.change_type = v; - } - - // repeated .google.api.Advice advices = 5; - - - pub fn get_advices(&self) -> &[Advice] { - &self.advices - } - pub fn clear_advices(&mut self) { - self.advices.clear(); - } - - // Param is passed by value, moved - pub fn set_advices(&mut self, v: ::protobuf::RepeatedField) { - self.advices = v; - } - - // Mutable pointer to the field. - pub fn mut_advices(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.advices - } - - // Take field - pub fn take_advices(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.advices, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(5); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "element", + |m: &ConfigChange| { &m.element }, + |m: &mut ConfigChange| { &mut m.element }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "old_value", + |m: &ConfigChange| { &m.old_value }, + |m: &mut ConfigChange| { &mut m.old_value }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "new_value", + |m: &ConfigChange| { &m.new_value }, + |m: &mut ConfigChange| { &mut m.new_value }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "change_type", + |m: &ConfigChange| { &m.change_type }, + |m: &mut ConfigChange| { &mut m.change_type }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "advices", + |m: &ConfigChange| { &m.advices }, + |m: &mut ConfigChange| { &mut m.advices }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ConfigChange", + fields, + oneofs, + ) } } impl ::protobuf::Message for ConfigChange { + const NAME: &'static str = "ConfigChange"; + fn is_initialized(&self) -> bool { - for v in &self.advices { - 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.element)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.element = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.old_value)?; + 18 => { + self.old_value = is.read_string()?; }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.new_value)?; + 26 => { + self.new_value = is.read_string()?; }, - 4 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.change_type, 4, &mut self.unknown_fields)? + 32 => { + self.change_type = is.read_enum_or_unknown()?; }, - 5 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.advices)?; + 42 => { + self.advices.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -205,7 +148,7 @@ impl ::protobuf::Message for ConfigChange { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.element.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.element); @@ -216,19 +159,19 @@ impl ::protobuf::Message for ConfigChange { if !self.new_value.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.new_value); } - if self.change_type != ChangeType::CHANGE_TYPE_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(4, self.change_type); + if self.change_type != ::protobuf::EnumOrUnknown::new(ChangeType::CHANGE_TYPE_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(4, self.change_type.value()); } for value in &self.advices { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.element.is_empty() { os.write_string(1, &self.element)?; } @@ -238,121 +181,80 @@ impl ::protobuf::Message for ConfigChange { if !self.new_value.is_empty() { os.write_string(3, &self.new_value)?; } - if self.change_type != ChangeType::CHANGE_TYPE_UNSPECIFIED { - os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.change_type))?; + if self.change_type != ::protobuf::EnumOrUnknown::new(ChangeType::CHANGE_TYPE_UNSPECIFIED) { + os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.change_type))?; } for v in &self.advices { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> ConfigChange { ConfigChange::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "element", - |m: &ConfigChange| { &m.element }, - |m: &mut ConfigChange| { &mut m.element }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "old_value", - |m: &ConfigChange| { &m.old_value }, - |m: &mut ConfigChange| { &mut m.old_value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "new_value", - |m: &ConfigChange| { &m.new_value }, - |m: &mut ConfigChange| { &mut m.new_value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "change_type", - |m: &ConfigChange| { &m.change_type }, - |m: &mut ConfigChange| { &mut m.change_type }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "advices", - |m: &ConfigChange| { &m.advices }, - |m: &mut ConfigChange| { &mut m.advices }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ConfigChange", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.element.clear(); + self.old_value.clear(); + self.new_value.clear(); + self.change_type = ::protobuf::EnumOrUnknown::new(ChangeType::CHANGE_TYPE_UNSPECIFIED); + self.advices.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static ConfigChange { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ConfigChange::new) + static instance: ConfigChange = ConfigChange { + element: ::std::string::String::new(), + old_value: ::std::string::String::new(), + new_value: ::std::string::String::new(), + change_type: ::protobuf::EnumOrUnknown::from_i32(0), + advices: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for ConfigChange { - fn clear(&mut self) { - self.element.clear(); - self.old_value.clear(); - self.new_value.clear(); - self.change_type = ChangeType::CHANGE_TYPE_UNSPECIFIED; - self.advices.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for ConfigChange { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ConfigChange").unwrap()).clone() } } -impl ::std::fmt::Debug for ConfigChange { +impl ::std::fmt::Display for ConfigChange { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ConfigChange { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Generated advice about this change, used for providing more +/// information about how a change will affect the existing service. +// @@protoc_insertion_point(message:google.api.Advice) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Advice { // message fields + /// Useful description for why this advice was applied and what actions should + /// be taken to mitigate any implied risks. + // @@protoc_insertion_point(field:google.api.Advice.description) pub description: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Advice.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Advice { @@ -366,47 +268,37 @@ impl Advice { ::std::default::Default::default() } - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "description", + |m: &Advice| { &m.description }, + |m: &mut Advice| { &mut m.description }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Advice", + fields, + oneofs, + ) } } impl ::protobuf::Message for Advice { + const NAME: &'static str = "Advice"; + 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 { - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 18 => { + self.description = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -415,105 +307,85 @@ impl ::protobuf::Message for Advice { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.description.is_empty() { my_size += ::protobuf::rt::string_size(2, &self.description); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.description.is_empty() { os.write_string(2, &self.description)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Advice { Advice::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &Advice| { &m.description }, - |m: &mut Advice| { &mut m.description }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Advice", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.description.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Advice { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Advice::new) + static instance: Advice = Advice { + description: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Advice { - fn clear(&mut self) { - self.description.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Advice { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Advice").unwrap()).clone() } } -impl ::std::fmt::Debug for Advice { +impl ::std::fmt::Display for Advice { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Advice { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +/// Classifies set of possible modifications to an object in the service +/// configuration. +#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] +// @@protoc_insertion_point(enum:google.api.ChangeType) pub enum ChangeType { + // @@protoc_insertion_point(enum_value:google.api.ChangeType.CHANGE_TYPE_UNSPECIFIED) CHANGE_TYPE_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.ChangeType.ADDED) ADDED = 1, + // @@protoc_insertion_point(enum_value:google.api.ChangeType.REMOVED) REMOVED = 2, + // @@protoc_insertion_point(enum_value:google.api.ChangeType.MODIFIED) MODIFIED = 3, } -impl ::protobuf::ProtobufEnum for ChangeType { +impl ::protobuf::Enum for ChangeType { + const NAME: &'static str = "ChangeType"; + fn value(&self) -> i32 { *self as i32 } @@ -528,25 +400,34 @@ impl ::protobuf::ProtobufEnum for ChangeType { } } - fn values() -> &'static [Self] { - static values: &'static [ChangeType] = &[ - ChangeType::CHANGE_TYPE_UNSPECIFIED, - ChangeType::ADDED, - ChangeType::REMOVED, - ChangeType::MODIFIED, - ]; - values + fn from_str(str: &str) -> ::std::option::Option { + match str { + "CHANGE_TYPE_UNSPECIFIED" => ::std::option::Option::Some(ChangeType::CHANGE_TYPE_UNSPECIFIED), + "ADDED" => ::std::option::Option::Some(ChangeType::ADDED), + "REMOVED" => ::std::option::Option::Some(ChangeType::REMOVED), + "MODIFIED" => ::std::option::Option::Some(ChangeType::MODIFIED), + _ => ::std::option::Option::None + } } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ChangeType", file_descriptor_proto()) - }) - } + const VALUES: &'static [ChangeType] = &[ + ChangeType::CHANGE_TYPE_UNSPECIFIED, + ChangeType::ADDED, + ChangeType::REMOVED, + ChangeType::MODIFIED, + ]; } -impl ::std::marker::Copy for ChangeType { +impl ::protobuf::EnumFull for ChangeType { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().enum_by_package_relative_name("ChangeType").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } } impl ::std::default::Default for ChangeType { @@ -555,9 +436,9 @@ impl ::std::default::Default for ChangeType { } } -impl ::protobuf::reflect::ProtobufValue for ChangeType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) +impl ChangeType { + fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ChangeType") } } @@ -573,7 +454,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ VED\x10\x02\x12\x0c\n\x08MODIFIED\x10\x03Bq\n\x0ecom.google.apiB\x11Conf\ igChangeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/configchan\ ge;configchange\xa2\x02\x04GAPIJ\xe5\x18\n\x06\x12\x04\x0e\0S\x01\n\xbc\ - \x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Google\ + \x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20Google\ \x20LLC\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\x20Y\ @@ -658,14 +539,33 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x12\x03R\x02\n\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03R\r\x0eb\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(ConfigChange::generated_message_descriptor_data()); + messages.push(Advice::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(ChangeType::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/consumer.rs b/googleapis-raw/src/api/consumer.rs index 87fcc9d..47c784f 100644 --- a/googleapis-raw/src/api/consumer.rs +++ b/googleapis-raw/src/api/consumer.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,28 +9,32 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/consumer.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.ProjectProperties) +#[derive(PartialEq,Clone,Default,Debug)] pub struct ProjectProperties { // message fields - pub properties: ::protobuf::RepeatedField, + /// List of per consumer project-specific properties. + // @@protoc_insertion_point(field:google.api.ProjectProperties.properties) + pub properties: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.ProjectProperties.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ProjectProperties { @@ -43,51 +48,37 @@ impl ProjectProperties { ::std::default::Default::default() } - // repeated .google.api.Property properties = 1; - - - pub fn get_properties(&self) -> &[Property] { - &self.properties - } - pub fn clear_properties(&mut self) { - self.properties.clear(); - } - - // Param is passed by value, moved - pub fn set_properties(&mut self, v: ::protobuf::RepeatedField) { - self.properties = v; - } - - // Mutable pointer to the field. - pub fn mut_properties(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.properties - } - - // Take field - pub fn take_properties(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.properties, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "properties", + |m: &ProjectProperties| { &m.properties }, + |m: &mut ProjectProperties| { &mut m.properties }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ProjectProperties", + fields, + oneofs, + ) } } impl ::protobuf::Message for ProjectProperties { + const NAME: &'static str = "ProjectProperties"; + fn is_initialized(&self) -> bool { - for v in &self.properties { - 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.properties)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.properties.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -96,108 +87,94 @@ impl ::protobuf::Message for ProjectProperties { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.properties { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.properties { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> ProjectProperties { ProjectProperties::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "properties", - |m: &ProjectProperties| { &m.properties }, - |m: &mut ProjectProperties| { &mut m.properties }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ProjectProperties", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.properties.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static ProjectProperties { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ProjectProperties::new) + static instance: ProjectProperties = ProjectProperties { + properties: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for ProjectProperties { - fn clear(&mut self) { - self.properties.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for ProjectProperties { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ProjectProperties").unwrap()).clone() } } -impl ::std::fmt::Debug for ProjectProperties { +impl ::std::fmt::Display for ProjectProperties { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ProjectProperties { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Defines project properties. +/// +/// API services can define properties that can be assigned to consumer projects +/// so that backends can perform response customization without having to make +/// additional calls or maintain additional storage. For example, Maps API +/// defines properties that controls map tile cache period, or whether to embed a +/// watermark in a result. +/// +/// These values can be set via API producer console. Only API providers can +/// define and set these properties. +// @@protoc_insertion_point(message:google.api.Property) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Property { // message fields + /// The name of the property (a.k.a key). + // @@protoc_insertion_point(field:google.api.Property.name) pub name: ::std::string::String, - pub field_type: Property_PropertyType, + /// The type of this property. + // @@protoc_insertion_point(field:google.api.Property.type) + pub type_: ::protobuf::EnumOrUnknown, + /// The description of the property + // @@protoc_insertion_point(field:google.api.Property.description) pub description: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Property.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Property { @@ -211,94 +188,53 @@ impl Property { ::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.api.Property.PropertyType type = 2; - - - pub fn get_field_type(&self) -> Property_PropertyType { - self.field_type - } - pub fn clear_field_type(&mut self) { - self.field_type = Property_PropertyType::UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_field_type(&mut self, v: Property_PropertyType) { - self.field_type = v; - } - - // string description = 3; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &Property| { &m.name }, + |m: &mut Property| { &mut m.name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "type", + |m: &Property| { &m.type_ }, + |m: &mut Property| { &mut m.type_ }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "description", + |m: &Property| { &m.description }, + |m: &mut Property| { &mut m.description }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Property", + fields, + oneofs, + ) } } impl ::protobuf::Message for Property { + const NAME: &'static str = "Property"; + 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)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.name = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 2, &mut self.unknown_fields)? + 16 => { + self.type_ = is.read_enum_or_unknown()?; }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; + 26 => { + self.description = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -307,176 +243,161 @@ impl ::protobuf::Message for Property { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.name); } - if self.field_type != Property_PropertyType::UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(2, self.field_type); + if self.type_ != ::protobuf::EnumOrUnknown::new(property::PropertyType::UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(2, self.type_.value()); } if !self.description.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.description); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.name.is_empty() { os.write_string(1, &self.name)?; } - if self.field_type != Property_PropertyType::UNSPECIFIED { - os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.field_type))?; + if self.type_ != ::protobuf::EnumOrUnknown::new(property::PropertyType::UNSPECIFIED) { + os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.type_))?; } if !self.description.is_empty() { os.write_string(3, &self.description)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Property { Property::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Property| { &m.name }, - |m: &mut Property| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "type", - |m: &Property| { &m.field_type }, - |m: &mut Property| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &Property| { &m.description }, - |m: &mut Property| { &mut m.description }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Property", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.name.clear(); + self.type_ = ::protobuf::EnumOrUnknown::new(property::PropertyType::UNSPECIFIED); + self.description.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Property { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Property::new) + static instance: Property = Property { + name: ::std::string::String::new(), + type_: ::protobuf::EnumOrUnknown::from_i32(0), + description: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Property { - fn clear(&mut self) { - self.name.clear(); - self.field_type = Property_PropertyType::UNSPECIFIED; - self.description.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Property { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Property").unwrap()).clone() } } -impl ::std::fmt::Debug for Property { +impl ::std::fmt::Display for Property { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Property { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum Property_PropertyType { - UNSPECIFIED = 0, - INT64 = 1, - BOOL = 2, - STRING = 3, - DOUBLE = 4, -} +/// Nested message and enums of message `Property` +pub mod property { + /// Supported data type of the property values + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.Property.PropertyType) + pub enum PropertyType { + // @@protoc_insertion_point(enum_value:google.api.Property.PropertyType.UNSPECIFIED) + UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.Property.PropertyType.INT64) + INT64 = 1, + // @@protoc_insertion_point(enum_value:google.api.Property.PropertyType.BOOL) + BOOL = 2, + // @@protoc_insertion_point(enum_value:google.api.Property.PropertyType.STRING) + STRING = 3, + // @@protoc_insertion_point(enum_value:google.api.Property.PropertyType.DOUBLE) + DOUBLE = 4, + } + + impl ::protobuf::Enum for PropertyType { + const NAME: &'static str = "PropertyType"; + + fn value(&self) -> i32 { + *self as i32 + } -impl ::protobuf::ProtobufEnum for Property_PropertyType { - fn value(&self) -> i32 { - *self as i32 - } + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(PropertyType::UNSPECIFIED), + 1 => ::std::option::Option::Some(PropertyType::INT64), + 2 => ::std::option::Option::Some(PropertyType::BOOL), + 3 => ::std::option::Option::Some(PropertyType::STRING), + 4 => ::std::option::Option::Some(PropertyType::DOUBLE), + _ => ::std::option::Option::None + } + } - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(Property_PropertyType::UNSPECIFIED), - 1 => ::std::option::Option::Some(Property_PropertyType::INT64), - 2 => ::std::option::Option::Some(Property_PropertyType::BOOL), - 3 => ::std::option::Option::Some(Property_PropertyType::STRING), - 4 => ::std::option::Option::Some(Property_PropertyType::DOUBLE), - _ => ::std::option::Option::None + fn from_str(str: &str) -> ::std::option::Option { + match str { + "UNSPECIFIED" => ::std::option::Option::Some(PropertyType::UNSPECIFIED), + "INT64" => ::std::option::Option::Some(PropertyType::INT64), + "BOOL" => ::std::option::Option::Some(PropertyType::BOOL), + "STRING" => ::std::option::Option::Some(PropertyType::STRING), + "DOUBLE" => ::std::option::Option::Some(PropertyType::DOUBLE), + _ => ::std::option::Option::None + } } - } - fn values() -> &'static [Self] { - static values: &'static [Property_PropertyType] = &[ - Property_PropertyType::UNSPECIFIED, - Property_PropertyType::INT64, - Property_PropertyType::BOOL, - Property_PropertyType::STRING, - Property_PropertyType::DOUBLE, + const VALUES: &'static [PropertyType] = &[ + PropertyType::UNSPECIFIED, + PropertyType::INT64, + PropertyType::BOOL, + PropertyType::STRING, + PropertyType::DOUBLE, ]; - values } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("Property.PropertyType", file_descriptor_proto()) - }) - } -} + impl ::protobuf::EnumFull for PropertyType { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("Property.PropertyType").unwrap()).clone() + } -impl ::std::marker::Copy for Property_PropertyType { -} + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } + } -impl ::std::default::Default for Property_PropertyType { - fn default() -> Self { - Property_PropertyType::UNSPECIFIED + impl ::std::default::Default for PropertyType { + fn default() -> Self { + PropertyType::UNSPECIFIED + } } -} -impl ::protobuf::reflect::ProtobufValue for Property_PropertyType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + impl PropertyType { + pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("Property.PropertyType") + } } } @@ -491,7 +412,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x06DOUBLE\x10\x04Bh\n\x0ecom.google.apiB\rConsumerProtoP\x01ZEgoogle.go\ lang.org/genproto/googleapis/api/serviceconfig;serviceconfigJ\xbb\x15\n\ \x06\x12\x04\x0e\0Q\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\ - \x20Copyright\x202016\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\ + \x20Copyright\x202024\x20Google\x20LLC\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\ @@ -568,14 +489,33 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x03P\t\x14\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03P\x17\x18b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(ProjectProperties::generated_message_descriptor_data()); + messages.push(Property::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(property::PropertyType::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/context.rs b/googleapis-raw/src/api/context.rs index 2d02cec..a66dd7b 100644 --- a/googleapis-raw/src/api/context.rs +++ b/googleapis-raw/src/api/context.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,28 +9,34 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/context.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Context) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Context { // message fields - pub rules: ::protobuf::RepeatedField, + /// A list of RPC context rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + // @@protoc_insertion_point(field:google.api.Context.rules) + pub rules: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Context.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Context { @@ -43,51 +50,37 @@ impl Context { ::std::default::Default::default() } - // repeated .google.api.ContextRule rules = 1; - - - pub fn get_rules(&self) -> &[ContextRule] { - &self.rules - } - pub fn clear_rules(&mut self) { - self.rules.clear(); - } - - // Param is passed by value, moved - pub fn set_rules(&mut self, v: ::protobuf::RepeatedField) { - self.rules = v; - } - - // Mutable pointer to the field. - pub fn mut_rules(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.rules - } - - // Take field - pub fn take_rules(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.rules, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "rules", + |m: &Context| { &m.rules }, + |m: &mut Context| { &mut m.rules }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Context", + fields, + oneofs, + ) } } impl ::protobuf::Message for Context { + const NAME: &'static str = "Context"; + fn is_initialized(&self) -> bool { - for v in &self.rules { - 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.rules)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.rules.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -96,110 +89,99 @@ impl ::protobuf::Message for Context { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.rules { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.rules { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Context { Context::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rules", - |m: &Context| { &m.rules }, - |m: &mut Context| { &mut m.rules }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Context", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.rules.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Context { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Context::new) + static instance: Context = Context { + rules: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Context { - fn clear(&mut self) { - self.rules.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Context { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Context").unwrap()).clone() } } -impl ::std::fmt::Debug for Context { +impl ::std::fmt::Display for Context { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Context { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// A context rule provides information about the context for an individual API +/// element. +// @@protoc_insertion_point(message:google.api.ContextRule) +#[derive(PartialEq,Clone,Default,Debug)] pub struct ContextRule { // message fields + /// Selects the methods to which this rule applies. + /// + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax + /// details. + // @@protoc_insertion_point(field:google.api.ContextRule.selector) pub selector: ::std::string::String, - pub requested: ::protobuf::RepeatedField<::std::string::String>, - pub provided: ::protobuf::RepeatedField<::std::string::String>, - pub allowed_request_extensions: ::protobuf::RepeatedField<::std::string::String>, - pub allowed_response_extensions: ::protobuf::RepeatedField<::std::string::String>, + /// A list of full type names of requested contexts, only the requested context + /// will be made available to the backend. + // @@protoc_insertion_point(field:google.api.ContextRule.requested) + pub requested: ::std::vec::Vec<::std::string::String>, + /// A list of full type names of provided contexts. It is used to support + /// propagating HTTP headers and ETags from the response extension. + // @@protoc_insertion_point(field:google.api.ContextRule.provided) + pub provided: ::std::vec::Vec<::std::string::String>, + /// A list of full type names or extension IDs of extensions allowed in grpc + /// side channel from client to backend. + // @@protoc_insertion_point(field:google.api.ContextRule.allowed_request_extensions) + pub allowed_request_extensions: ::std::vec::Vec<::std::string::String>, + /// A list of full type names or extension IDs of extensions allowed in grpc + /// side channel from backend to client. + // @@protoc_insertion_point(field:google.api.ContextRule.allowed_response_extensions) + pub allowed_response_extensions: ::std::vec::Vec<::std::string::String>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.ContextRule.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ContextRule { @@ -213,159 +195,69 @@ impl ContextRule { ::std::default::Default::default() } - // string selector = 1; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - - // repeated string requested = 2; - - - pub fn get_requested(&self) -> &[::std::string::String] { - &self.requested - } - pub fn clear_requested(&mut self) { - self.requested.clear(); - } - - // Param is passed by value, moved - pub fn set_requested(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.requested = v; - } - - // Mutable pointer to the field. - pub fn mut_requested(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.requested - } - - // Take field - pub fn take_requested(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.requested, ::protobuf::RepeatedField::new()) - } - - // repeated string provided = 3; - - - pub fn get_provided(&self) -> &[::std::string::String] { - &self.provided - } - pub fn clear_provided(&mut self) { - self.provided.clear(); - } - - // Param is passed by value, moved - pub fn set_provided(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.provided = v; - } - - // Mutable pointer to the field. - pub fn mut_provided(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.provided - } - - // Take field - pub fn take_provided(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.provided, ::protobuf::RepeatedField::new()) - } - - // repeated string allowed_request_extensions = 4; - - - pub fn get_allowed_request_extensions(&self) -> &[::std::string::String] { - &self.allowed_request_extensions - } - pub fn clear_allowed_request_extensions(&mut self) { - self.allowed_request_extensions.clear(); - } - - // Param is passed by value, moved - pub fn set_allowed_request_extensions(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.allowed_request_extensions = v; - } - - // Mutable pointer to the field. - pub fn mut_allowed_request_extensions(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.allowed_request_extensions - } - - // Take field - pub fn take_allowed_request_extensions(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.allowed_request_extensions, ::protobuf::RepeatedField::new()) - } - - // repeated string allowed_response_extensions = 5; - - - pub fn get_allowed_response_extensions(&self) -> &[::std::string::String] { - &self.allowed_response_extensions - } - pub fn clear_allowed_response_extensions(&mut self) { - self.allowed_response_extensions.clear(); - } - - // Param is passed by value, moved - pub fn set_allowed_response_extensions(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.allowed_response_extensions = v; - } - - // Mutable pointer to the field. - pub fn mut_allowed_response_extensions(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.allowed_response_extensions - } - - // Take field - pub fn take_allowed_response_extensions(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.allowed_response_extensions, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(5); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &ContextRule| { &m.selector }, + |m: &mut ContextRule| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "requested", + |m: &ContextRule| { &m.requested }, + |m: &mut ContextRule| { &mut m.requested }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "provided", + |m: &ContextRule| { &m.provided }, + |m: &mut ContextRule| { &mut m.provided }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "allowed_request_extensions", + |m: &ContextRule| { &m.allowed_request_extensions }, + |m: &mut ContextRule| { &mut m.allowed_request_extensions }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "allowed_response_extensions", + |m: &ContextRule| { &m.allowed_response_extensions }, + |m: &mut ContextRule| { &mut m.allowed_response_extensions }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ContextRule", + fields, + oneofs, + ) } } impl ::protobuf::Message for ContextRule { + const NAME: &'static str = "ContextRule"; + 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.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.selector = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.requested)?; + 18 => { + self.requested.push(is.read_string()?); }, - 3 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.provided)?; + 26 => { + self.provided.push(is.read_string()?); }, - 4 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.allowed_request_extensions)?; + 34 => { + self.allowed_request_extensions.push(is.read_string()?); }, - 5 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.allowed_response_extensions)?; + 42 => { + self.allowed_response_extensions.push(is.read_string()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -374,7 +266,7 @@ impl ::protobuf::Message for ContextRule { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.selector); @@ -391,12 +283,12 @@ impl ::protobuf::Message for ContextRule { for value in &self.allowed_response_extensions { my_size += ::protobuf::rt::string_size(5, &value); }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(1, &self.selector)?; } @@ -412,104 +304,59 @@ impl ::protobuf::Message for ContextRule { for v in &self.allowed_response_extensions { os.write_string(5, &v)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> ContextRule { ContextRule::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &ContextRule| { &m.selector }, - |m: &mut ContextRule| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "requested", - |m: &ContextRule| { &m.requested }, - |m: &mut ContextRule| { &mut m.requested }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "provided", - |m: &ContextRule| { &m.provided }, - |m: &mut ContextRule| { &mut m.provided }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "allowed_request_extensions", - |m: &ContextRule| { &m.allowed_request_extensions }, - |m: &mut ContextRule| { &mut m.allowed_request_extensions }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "allowed_response_extensions", - |m: &ContextRule| { &m.allowed_response_extensions }, - |m: &mut ContextRule| { &mut m.allowed_response_extensions }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ContextRule", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static ContextRule { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ContextRule::new) - } -} - -impl ::protobuf::Clear for ContextRule { fn clear(&mut self) { self.selector.clear(); self.requested.clear(); self.provided.clear(); self.allowed_request_extensions.clear(); self.allowed_response_extensions.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static ContextRule { + static instance: ContextRule = ContextRule { + selector: ::std::string::String::new(), + requested: ::std::vec::Vec::new(), + provided: ::std::vec::Vec::new(), + allowed_request_extensions: ::std::vec::Vec::new(), + allowed_response_extensions: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for ContextRule { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ContextRule").unwrap()).clone() } } -impl ::std::fmt::Debug for ContextRule { +impl ::std::fmt::Display for ContextRule { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ContextRule { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -521,9 +368,9 @@ static file_descriptor_proto_data: &'static [u8] = b"\ xtensions\x18\x04\x20\x03(\tR\x18allowedRequestExtensions\x12>\n\x1ballo\ wed_response_extensions\x18\x05\x20\x03(\tR\x19allowedResponseExtensions\ Bn\n\x0ecom.google.apiB\x0cContextProtoP\x01ZEgoogle.golang.org/genproto\ - /googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIJ\x8c\x17\n\ - \x06\x12\x04\x0e\0Y\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\ - \x20Copyright\x202023\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\ + /googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIJ\xa9\x18\n\ + \x06\x12\x04\x0e\0[\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\ + \x20Copyright\x202024\x20Google\x20LLC\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\ @@ -572,7 +419,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ s\x20follow\x20\"last\x20one\x20wins\"\x20order.\n\n\x0c\n\x05\x04\0\x02\ \0\x04\x12\x03@\x02\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03@\x0b\x16\n\x0c\ \n\x05\x04\0\x02\0\x01\x12\x03@\x17\x1c\n\x0c\n\x05\x04\0\x02\0\x03\x12\ - \x03@\x1f\x20\nc\n\x02\x04\x01\x12\x04E\0Y\x01\x1aW\x20A\x20context\x20r\ + \x03@\x1f\x20\nc\n\x02\x04\x01\x12\x04E\0[\x01\x1aW\x20A\x20context\x20r\ ule\x20provides\x20information\x20about\x20the\x20context\x20for\x20an\ \x20individual\x20API\n\x20element.\n\n\n\n\x03\x04\x01\x01\x12\x03E\x08\ \x13\n\x91\x01\n\x04\x04\x01\x02\0\x12\x03J\x02\x16\x1a\x83\x01\x20Selec\ @@ -580,37 +427,59 @@ static file_descriptor_proto_data: &'static [u8] = b"\ efer\x20to\x20[selector][google.api.DocumentationRule.selector]\x20for\ \x20syntax\n\x20details.\n\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03J\x02\ \x08\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03J\t\x11\n\x0c\n\x05\x04\x01\ - \x02\0\x03\x12\x03J\x14\x15\n?\n\x04\x04\x01\x02\x01\x12\x03M\x02\x20\ - \x1a2\x20A\x20list\x20of\x20full\x20type\x20names\x20of\x20requested\x20\ - contexts.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03M\x02\n\n\x0c\n\x05\ - \x04\x01\x02\x01\x05\x12\x03M\x0b\x11\n\x0c\n\x05\x04\x01\x02\x01\x01\ - \x12\x03M\x12\x1b\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03M\x1e\x1f\n>\n\ - \x04\x04\x01\x02\x02\x12\x03P\x02\x1f\x1a1\x20A\x20list\x20of\x20full\ - \x20type\x20names\x20of\x20provided\x20contexts.\n\n\x0c\n\x05\x04\x01\ - \x02\x02\x04\x12\x03P\x02\n\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03P\x0b\ - \x11\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03P\x12\x1a\n\x0c\n\x05\x04\ - \x01\x02\x02\x03\x12\x03P\x1d\x1e\n}\n\x04\x04\x01\x02\x03\x12\x03T\x021\ - \x1ap\x20A\x20list\x20of\x20full\x20type\x20names\x20or\x20extension\x20\ - IDs\x20of\x20extensions\x20allowed\x20in\x20grpc\n\x20side\x20channel\ - \x20from\x20client\x20to\x20backend.\n\n\x0c\n\x05\x04\x01\x02\x03\x04\ - \x12\x03T\x02\n\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03T\x0b\x11\n\x0c\n\ - \x05\x04\x01\x02\x03\x01\x12\x03T\x12,\n\x0c\n\x05\x04\x01\x02\x03\x03\ - \x12\x03T/0\n}\n\x04\x04\x01\x02\x04\x12\x03X\x022\x1ap\x20A\x20list\x20\ - of\x20full\x20type\x20names\x20or\x20extension\x20IDs\x20of\x20extension\ - s\x20allowed\x20in\x20grpc\n\x20side\x20channel\x20from\x20backend\x20to\ - \x20client.\n\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x03X\x02\n\n\x0c\n\x05\ - \x04\x01\x02\x04\x05\x12\x03X\x0b\x11\n\x0c\n\x05\x04\x01\x02\x04\x01\ - \x12\x03X\x12-\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x03X01b\x06proto3\ + \x02\0\x03\x12\x03J\x14\x15\n\x82\x01\n\x04\x04\x01\x02\x01\x12\x03N\x02\ + \x20\x1au\x20A\x20list\x20of\x20full\x20type\x20names\x20of\x20requested\ + \x20contexts,\x20only\x20the\x20requested\x20context\n\x20will\x20be\x20\ + made\x20available\x20to\x20the\x20backend.\n\n\x0c\n\x05\x04\x01\x02\x01\ + \x04\x12\x03N\x02\n\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03N\x0b\x11\n\ + \x0c\n\x05\x04\x01\x02\x01\x01\x12\x03N\x12\x1b\n\x0c\n\x05\x04\x01\x02\ + \x01\x03\x12\x03N\x1e\x1f\n\x96\x01\n\x04\x04\x01\x02\x02\x12\x03R\x02\ + \x1f\x1a\x88\x01\x20A\x20list\x20of\x20full\x20type\x20names\x20of\x20pr\ + ovided\x20contexts.\x20It\x20is\x20used\x20to\x20support\n\x20propagatin\ + g\x20HTTP\x20headers\x20and\x20ETags\x20from\x20the\x20response\x20exten\ + sion.\n\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03R\x02\n\n\x0c\n\x05\x04\ + \x01\x02\x02\x05\x12\x03R\x0b\x11\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\ + \x03R\x12\x1a\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03R\x1d\x1e\n}\n\x04\ + \x04\x01\x02\x03\x12\x03V\x021\x1ap\x20A\x20list\x20of\x20full\x20type\ + \x20names\x20or\x20extension\x20IDs\x20of\x20extensions\x20allowed\x20in\ + \x20grpc\n\x20side\x20channel\x20from\x20client\x20to\x20backend.\n\n\ + \x0c\n\x05\x04\x01\x02\x03\x04\x12\x03V\x02\n\n\x0c\n\x05\x04\x01\x02\ + \x03\x05\x12\x03V\x0b\x11\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03V\x12,\ + \n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03V/0\n}\n\x04\x04\x01\x02\x04\x12\ + \x03Z\x022\x1ap\x20A\x20list\x20of\x20full\x20type\x20names\x20or\x20ext\ + ension\x20IDs\x20of\x20extensions\x20allowed\x20in\x20grpc\n\x20side\x20\ + channel\x20from\x20backend\x20to\x20client.\n\n\x0c\n\x05\x04\x01\x02\ + \x04\x04\x12\x03Z\x02\n\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\x03Z\x0b\x11\ + \n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x03Z\x12-\n\x0c\n\x05\x04\x01\x02\ + \x04\x03\x12\x03Z01b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(Context::generated_message_descriptor_data()); + messages.push(ContextRule::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/control.rs b/googleapis-raw/src/api/control.rs index fb283c5..6db941e 100644 --- a/googleapis-raw/src/api/control.rs +++ b/googleapis-raw/src/api/control.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,29 +9,37 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/control.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Control) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Control { // message fields + /// The service controller environment to use. If empty, no control plane + /// feature (like quota and billing) will be enabled. The recommended value for + /// most services is servicecontrol.googleapis.com + // @@protoc_insertion_point(field:google.api.Control.environment) pub environment: ::std::string::String, - pub method_policies: ::protobuf::RepeatedField, + /// Defines policies applying to the API methods of the service. + // @@protoc_insertion_point(field:google.api.Control.method_policies) + pub method_policies: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Control.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Control { @@ -44,80 +53,45 @@ impl Control { ::std::default::Default::default() } - // string environment = 1; - - - pub fn get_environment(&self) -> &str { - &self.environment - } - pub fn clear_environment(&mut self) { - self.environment.clear(); - } - - // Param is passed by value, moved - pub fn set_environment(&mut self, v: ::std::string::String) { - self.environment = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_environment(&mut self) -> &mut ::std::string::String { - &mut self.environment - } - - // Take field - pub fn take_environment(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.environment, ::std::string::String::new()) - } - - // repeated .google.api.MethodPolicy method_policies = 4; - - - pub fn get_method_policies(&self) -> &[super::policy::MethodPolicy] { - &self.method_policies - } - pub fn clear_method_policies(&mut self) { - self.method_policies.clear(); - } - - // Param is passed by value, moved - pub fn set_method_policies(&mut self, v: ::protobuf::RepeatedField) { - self.method_policies = v; - } - - // Mutable pointer to the field. - pub fn mut_method_policies(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.method_policies - } - - // Take field - pub fn take_method_policies(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.method_policies, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "environment", + |m: &Control| { &m.environment }, + |m: &mut Control| { &mut m.environment }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "method_policies", + |m: &Control| { &m.method_policies }, + |m: &mut Control| { &mut m.method_policies }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Control", + fields, + oneofs, + ) } } impl ::protobuf::Message for Control { + const NAME: &'static str = "Control"; + fn is_initialized(&self) -> bool { - for v in &self.method_policies { - 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.environment)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.environment = is.read_string()?; }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.method_policies)?; + 34 => { + self.method_policies.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -126,109 +100,74 @@ impl ::protobuf::Message for Control { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.environment.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.environment); } for value in &self.method_policies { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.environment.is_empty() { os.write_string(1, &self.environment)?; } for v in &self.method_policies { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Control { Control::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "environment", - |m: &Control| { &m.environment }, - |m: &mut Control| { &mut m.environment }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "method_policies", - |m: &Control| { &m.method_policies }, - |m: &mut Control| { &mut m.method_policies }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Control", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.environment.clear(); + self.method_policies.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Control { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Control::new) + static instance: Control = Control { + environment: ::std::string::String::new(), + method_policies: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Control { - fn clear(&mut self) { - self.environment.clear(); - self.method_policies.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Control { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Control").unwrap()).clone() } } -impl ::std::fmt::Debug for Control { +impl ::std::fmt::Display for Control { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Control { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -238,7 +177,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ .MethodPolicyR\x0emethodPoliciesBn\n\x0ecom.google.apiB\x0cControlProtoP\ \x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;servicecon\ fig\xa2\x02\x04GAPIJ\xf5\t\n\x06\x12\x04\x0e\0(\x01\n\xbc\x04\n\x01\x0c\ - \x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Google\x20LLC\n\n\ + \x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20Google\x20LLC\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\ @@ -274,14 +213,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(1); + deps.push(super::policy::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(1); + messages.push(Control::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/distribution.rs b/googleapis-raw/src/api/distribution.rs index ca5c195..e9a29f0 100644 --- a/googleapis-raw/src/api/distribution.rs +++ b/googleapis-raw/src/api/distribution.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,34 +9,82 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/distribution.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default)] +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; + +/// `Distribution` contains summary statistics for a population of values. It +/// optionally contains a histogram representing the distribution of those values +/// across a set of buckets. +/// +/// The summary statistics are the count, mean, sum of the squared deviation from +/// the mean, the minimum, and the maximum of the set of population of values. +/// The histogram is based on a sequence of buckets and gives a count of values +/// that fall into each bucket. The boundaries of the buckets are given either +/// explicitly or by formulas for buckets of fixed or exponentially increasing +/// widths. +/// +/// Although it is not forbidden, it is generally a bad idea to include +/// non-finite values (infinities or NaNs) in the population of values, as this +/// will render the `mean` and `sum_of_squared_deviation` fields meaningless. +// @@protoc_insertion_point(message:google.api.Distribution) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Distribution { // message fields + /// The number of values in the population. Must be non-negative. This value + /// must equal the sum of the values in `bucket_counts` if a histogram is + /// provided. + // @@protoc_insertion_point(field:google.api.Distribution.count) pub count: i64, + /// The arithmetic mean of the values in the population. If `count` is zero + /// then this field must be zero. + // @@protoc_insertion_point(field:google.api.Distribution.mean) pub mean: f64, + // @@protoc_insertion_point(field:google.api.Distribution.sum_of_squared_deviation) pub sum_of_squared_deviation: f64, - pub range: ::protobuf::SingularPtrField, - pub bucket_options: ::protobuf::SingularPtrField, + /// If specified, contains the range of the population values. The field + /// must not be present if the `count` is zero. + // @@protoc_insertion_point(field:google.api.Distribution.range) + pub range: ::protobuf::MessageField, + /// Defines the histogram bucket boundaries. If the distribution does not + /// contain a histogram, then omit this field. + // @@protoc_insertion_point(field:google.api.Distribution.bucket_options) + pub bucket_options: ::protobuf::MessageField, + /// The number of values in each bucket of the histogram, as described in + /// `bucket_options`. If the distribution does not have a histogram, then omit + /// this field. If there is a histogram, then the sum of the values in + /// `bucket_counts` must equal the value in the `count` field of the + /// distribution. + /// + /// If present, `bucket_counts` should contain N values, where N is the number + /// of buckets specified in `bucket_options`. If you supply fewer than N + /// values, the remaining values are assumed to be 0. + /// + /// The order of the values in `bucket_counts` follows the bucket numbering + /// schemes described for the three bucket types. The first value must be the + /// count for the underflow bucket (number 0). The next N-2 values are the + /// counts for the finite buckets (number 1 through N-2). The N'th value in + /// `bucket_counts` is the count for the overflow bucket (number N-1). + // @@protoc_insertion_point(field:google.api.Distribution.bucket_counts) pub bucket_counts: ::std::vec::Vec, - pub exemplars: ::protobuf::RepeatedField, + /// Must be in increasing order of `value` field. + // @@protoc_insertion_point(field:google.api.Distribution.exemplars) + pub exemplars: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Distribution.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Distribution { @@ -49,227 +98,88 @@ impl Distribution { ::std::default::Default::default() } - // int64 count = 1; - - - pub fn get_count(&self) -> i64 { - self.count - } - pub fn clear_count(&mut self) { - self.count = 0; - } - - // Param is passed by value, moved - pub fn set_count(&mut self, v: i64) { - self.count = v; - } - - // double mean = 2; - - - pub fn get_mean(&self) -> f64 { - self.mean - } - pub fn clear_mean(&mut self) { - self.mean = 0.; - } - - // Param is passed by value, moved - pub fn set_mean(&mut self, v: f64) { - self.mean = v; - } - - // double sum_of_squared_deviation = 3; - - - pub fn get_sum_of_squared_deviation(&self) -> f64 { - self.sum_of_squared_deviation - } - pub fn clear_sum_of_squared_deviation(&mut self) { - self.sum_of_squared_deviation = 0.; - } - - // Param is passed by value, moved - pub fn set_sum_of_squared_deviation(&mut self, v: f64) { - self.sum_of_squared_deviation = v; - } - - // .google.api.Distribution.Range range = 4; - - - pub fn get_range(&self) -> &Distribution_Range { - self.range.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_range(&mut self) { - self.range.clear(); - } - - pub fn has_range(&self) -> bool { - self.range.is_some() - } - - // Param is passed by value, moved - pub fn set_range(&mut self, v: Distribution_Range) { - self.range = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_range(&mut self) -> &mut Distribution_Range { - if self.range.is_none() { - self.range.set_default(); - } - self.range.as_mut().unwrap() - } - - // Take field - pub fn take_range(&mut self) -> Distribution_Range { - self.range.take().unwrap_or_else(|| Distribution_Range::new()) - } - - // .google.api.Distribution.BucketOptions bucket_options = 6; - - - pub fn get_bucket_options(&self) -> &Distribution_BucketOptions { - self.bucket_options.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_bucket_options(&mut self) { - self.bucket_options.clear(); - } - - pub fn has_bucket_options(&self) -> bool { - self.bucket_options.is_some() - } - - // Param is passed by value, moved - pub fn set_bucket_options(&mut self, v: Distribution_BucketOptions) { - self.bucket_options = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_bucket_options(&mut self) -> &mut Distribution_BucketOptions { - if self.bucket_options.is_none() { - self.bucket_options.set_default(); - } - self.bucket_options.as_mut().unwrap() - } - - // Take field - pub fn take_bucket_options(&mut self) -> Distribution_BucketOptions { - self.bucket_options.take().unwrap_or_else(|| Distribution_BucketOptions::new()) - } - - // repeated int64 bucket_counts = 7; - - - pub fn get_bucket_counts(&self) -> &[i64] { - &self.bucket_counts - } - pub fn clear_bucket_counts(&mut self) { - self.bucket_counts.clear(); - } - - // Param is passed by value, moved - pub fn set_bucket_counts(&mut self, v: ::std::vec::Vec) { - self.bucket_counts = v; - } - - // Mutable pointer to the field. - pub fn mut_bucket_counts(&mut self) -> &mut ::std::vec::Vec { - &mut self.bucket_counts - } - - // Take field - pub fn take_bucket_counts(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.bucket_counts, ::std::vec::Vec::new()) - } - - // repeated .google.api.Distribution.Exemplar exemplars = 10; - - - pub fn get_exemplars(&self) -> &[Distribution_Exemplar] { - &self.exemplars - } - pub fn clear_exemplars(&mut self) { - self.exemplars.clear(); - } - - // Param is passed by value, moved - pub fn set_exemplars(&mut self, v: ::protobuf::RepeatedField) { - self.exemplars = v; - } - - // Mutable pointer to the field. - pub fn mut_exemplars(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.exemplars - } - - // Take field - pub fn take_exemplars(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.exemplars, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(7); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "count", + |m: &Distribution| { &m.count }, + |m: &mut Distribution| { &mut m.count }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "mean", + |m: &Distribution| { &m.mean }, + |m: &mut Distribution| { &mut m.mean }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "sum_of_squared_deviation", + |m: &Distribution| { &m.sum_of_squared_deviation }, + |m: &mut Distribution| { &mut m.sum_of_squared_deviation }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, distribution::Range>( + "range", + |m: &Distribution| { &m.range }, + |m: &mut Distribution| { &mut m.range }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, distribution::BucketOptions>( + "bucket_options", + |m: &Distribution| { &m.bucket_options }, + |m: &mut Distribution| { &mut m.bucket_options }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "bucket_counts", + |m: &Distribution| { &m.bucket_counts }, + |m: &mut Distribution| { &mut m.bucket_counts }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "exemplars", + |m: &Distribution| { &m.exemplars }, + |m: &mut Distribution| { &mut m.exemplars }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Distribution", + fields, + oneofs, + ) } } impl ::protobuf::Message for Distribution { + const NAME: &'static str = "Distribution"; + fn is_initialized(&self) -> bool { - for v in &self.range { - if !v.is_initialized() { - return false; - } - }; - for v in &self.bucket_options { - if !v.is_initialized() { - return false; - } - }; - for v in &self.exemplars { - 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_int64()?; - self.count = tmp; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.count = is.read_int64()?; + }, + 17 => { + self.mean = is.read_double()?; }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.mean = tmp; + 25 => { + self.sum_of_squared_deviation = is.read_double()?; }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.sum_of_squared_deviation = tmp; + 34 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.range)?; }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.range)?; + 50 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.bucket_options)?; }, - 6 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.bucket_options)?; + 58 => { + is.read_repeated_packed_int64_into(&mut self.bucket_counts)?; }, - 7 => { - ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.bucket_counts)?; + 56 => { + self.bucket_counts.push(is.read_int64()?); }, - 10 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.exemplars)?; + 82 => { + self.exemplars.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -278,38 +188,38 @@ impl ::protobuf::Message for Distribution { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if self.count != 0 { - my_size += ::protobuf::rt::value_size(1, self.count, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::int64_size(1, self.count); } if self.mean != 0. { - my_size += 9; + my_size += 1 + 8; } if self.sum_of_squared_deviation != 0. { - my_size += 9; + my_size += 1 + 8; } - if let Some(ref v) = self.range.as_ref() { + if let Some(v) = self.range.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - if let Some(ref v) = self.bucket_options.as_ref() { + if let Some(v) = self.bucket_options.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } for value in &self.bucket_counts { - my_size += ::protobuf::rt::value_size(7, *value, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::int64_size(7, *value); }; for value in &self.exemplars { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if self.count != 0 { os.write_int64(1, self.count)?; } @@ -319,112 +229,34 @@ impl ::protobuf::Message for Distribution { if self.sum_of_squared_deviation != 0. { os.write_double(3, self.sum_of_squared_deviation)?; } - if let Some(ref v) = self.range.as_ref() { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + if let Some(v) = self.range.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; } - if let Some(ref v) = self.bucket_options.as_ref() { - os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + if let Some(v) = self.bucket_options.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; } for v in &self.bucket_counts { os.write_int64(7, *v)?; }; for v in &self.exemplars { - os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Distribution { Distribution::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "count", - |m: &Distribution| { &m.count }, - |m: &mut Distribution| { &mut m.count }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "mean", - |m: &Distribution| { &m.mean }, - |m: &mut Distribution| { &mut m.mean }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "sum_of_squared_deviation", - |m: &Distribution| { &m.sum_of_squared_deviation }, - |m: &mut Distribution| { &mut m.sum_of_squared_deviation }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "range", - |m: &Distribution| { &m.range }, - |m: &mut Distribution| { &mut m.range }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "bucket_options", - |m: &Distribution| { &m.bucket_options }, - |m: &mut Distribution| { &mut m.bucket_options }, - )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "bucket_counts", - |m: &Distribution| { &m.bucket_counts }, - |m: &mut Distribution| { &mut m.bucket_counts }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "exemplars", - |m: &Distribution| { &m.exemplars }, - |m: &mut Distribution| { &mut m.exemplars }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Distribution", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static Distribution { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Distribution::new) - } -} - -impl ::protobuf::Clear for Distribution { fn clear(&mut self) { self.count = 0; self.mean = 0.; @@ -433,1422 +265,1160 @@ impl ::protobuf::Clear for Distribution { self.bucket_options.clear(); self.bucket_counts.clear(); self.exemplars.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); } -} -impl ::std::fmt::Debug for Distribution { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + fn default_instance() -> &'static Distribution { + static instance: Distribution = Distribution { + count: 0, + mean: 0., + sum_of_squared_deviation: 0., + range: ::protobuf::MessageField::none(), + bucket_options: ::protobuf::MessageField::none(), + bucket_counts: ::std::vec::Vec::new(), + exemplars: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::reflect::ProtobufValue for Distribution { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) +impl ::protobuf::MessageFull for Distribution { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Distribution").unwrap()).clone() } } -#[derive(PartialEq,Clone,Default)] -pub struct Distribution_Range { - // message fields - pub min: f64, - pub max: f64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Distribution_Range { - fn default() -> &'a Distribution_Range { - ::default_instance() +impl ::std::fmt::Display for Distribution { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) } } -impl Distribution_Range { - pub fn new() -> Distribution_Range { - ::std::default::Default::default() - } - - // double min = 1; - - - pub fn get_min(&self) -> f64 { - self.min - } - pub fn clear_min(&mut self) { - self.min = 0.; - } - - // Param is passed by value, moved - pub fn set_min(&mut self, v: f64) { - self.min = v; - } - - // double max = 2; - - - pub fn get_max(&self) -> f64 { - self.max - } - pub fn clear_max(&mut self) { - self.max = 0.; - } - - // Param is passed by value, moved - pub fn set_max(&mut self, v: f64) { - self.max = v; - } +impl ::protobuf::reflect::ProtobufValue for Distribution { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -impl ::protobuf::Message for Distribution_Range { - 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 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.min = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.max = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; +/// Nested message and enums of message `Distribution` +pub mod distribution { + /// The range of the population values. + // @@protoc_insertion_point(message:google.api.Distribution.Range) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct Range { + // message fields + /// The minimum of the population values. + // @@protoc_insertion_point(field:google.api.Distribution.Range.min) + pub min: f64, + /// The maximum of the population values. + // @@protoc_insertion_point(field:google.api.Distribution.Range.max) + pub max: f64, + // special fields + // @@protoc_insertion_point(special_field:google.api.Distribution.Range.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a Range { + fn default() -> &'a Range { + ::default_instance() } - ::std::result::Result::Ok(()) } - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.min != 0. { - my_size += 9; - } - if self.max != 0. { - my_size += 9; + impl Range { + pub fn new() -> Range { + ::std::default::Default::default() } - 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.min != 0. { - os.write_double(1, self.min)?; - } - if self.max != 0. { - os.write_double(2, self.max)?; - } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Distribution_Range { - Distribution_Range::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "min", - |m: &Distribution_Range| { &m.min }, - |m: &mut Distribution_Range| { &mut m.min }, + |m: &Range| { &m.min }, + |m: &mut Range| { &mut m.min }, )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "max", - |m: &Distribution_Range| { &m.max }, - |m: &mut Distribution_Range| { &mut m.max }, + |m: &Range| { &m.max }, + |m: &mut Range| { &mut m.max }, )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Distribution.Range", fields, - file_descriptor_proto() + oneofs, ) - }) - } - - fn default_instance() -> &'static Distribution_Range { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Distribution_Range::new) - } -} - -impl ::protobuf::Clear for Distribution_Range { - fn clear(&mut self) { - self.min = 0.; - self.max = 0.; - self.unknown_fields.clear(); + } } -} -impl ::std::fmt::Debug for Distribution_Range { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} + impl ::protobuf::Message for Range { + const NAME: &'static str = "Range"; -impl ::protobuf::reflect::ProtobufValue for Distribution_Range { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} + fn is_initialized(&self) -> bool { + true + } -#[derive(PartialEq,Clone,Default)] -pub struct Distribution_BucketOptions { - // message oneof groups - pub options: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 9 => { + self.min = is.read_double()?; + }, + 17 => { + self.max = is.read_double()?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } -impl<'a> ::std::default::Default for &'a Distribution_BucketOptions { - fn default() -> &'a Distribution_BucketOptions { - ::default_instance() - } -} + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if self.min != 0. { + my_size += 1 + 8; + } + if self.max != 0. { + my_size += 1 + 8; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } -#[derive(Clone,PartialEq,Debug)] -pub enum Distribution_BucketOptions_oneof_options { - linear_buckets(Distribution_BucketOptions_Linear), - exponential_buckets(Distribution_BucketOptions_Exponential), - explicit_buckets(Distribution_BucketOptions_Explicit), -} + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if self.min != 0. { + os.write_double(1, self.min)?; + } + if self.max != 0. { + os.write_double(2, self.max)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } -impl Distribution_BucketOptions { - pub fn new() -> Distribution_BucketOptions { - ::std::default::Default::default() - } + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } - // .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + fn new() -> Range { + Range::new() + } - pub fn get_linear_buckets(&self) -> &Distribution_BucketOptions_Linear { - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::linear_buckets(ref v)) => v, - _ => ::default_instance(), + fn clear(&mut self) { + self.min = 0.; + self.max = 0.; + self.special_fields.clear(); } - } - pub fn clear_linear_buckets(&mut self) { - self.options = ::std::option::Option::None; - } - pub fn has_linear_buckets(&self) -> bool { - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::linear_buckets(..)) => true, - _ => false, + fn default_instance() -> &'static Range { + static instance: Range = Range { + min: 0., + max: 0., + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } - // Param is passed by value, moved - pub fn set_linear_buckets(&mut self, v: Distribution_BucketOptions_Linear) { - self.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::linear_buckets(v)) + impl ::protobuf::MessageFull for Range { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Distribution.Range").unwrap()).clone() + } } - // Mutable pointer to the field. - pub fn mut_linear_buckets(&mut self) -> &mut Distribution_BucketOptions_Linear { - if let ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::linear_buckets(_)) = self.options { - } else { - self.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::linear_buckets(Distribution_BucketOptions_Linear::new())); - } - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::linear_buckets(ref mut v)) => v, - _ => panic!(), + impl ::std::fmt::Display for Range { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) } } - // Take field - pub fn take_linear_buckets(&mut self) -> Distribution_BucketOptions_Linear { - if self.has_linear_buckets() { - match self.options.take() { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::linear_buckets(v)) => v, - _ => panic!(), - } - } else { - Distribution_BucketOptions_Linear::new() + impl ::protobuf::reflect::ProtobufValue for Range { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; + } + + /// `BucketOptions` describes the bucket boundaries used to create a histogram + /// for the distribution. The buckets can be in a linear sequence, an + /// exponential sequence, or each bucket can be specified explicitly. + /// `BucketOptions` does not include the number of values in each bucket. + /// + /// A bucket has an inclusive lower bound and exclusive upper bound for the + /// values that are counted for that bucket. The upper bound of a bucket must + /// be strictly greater than the lower bound. The sequence of N buckets for a + /// distribution consists of an underflow bucket (number 0), zero or more + /// finite buckets (number 1 through N - 2) and an overflow bucket (number N - + /// 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the + /// same as the upper bound of bucket i - 1. The buckets span the whole range + /// of finite values: lower bound of the underflow bucket is -infinity and the + /// upper bound of the overflow bucket is +infinity. The finite buckets are + /// so-called because both bounds are finite. + // @@protoc_insertion_point(message:google.api.Distribution.BucketOptions) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct BucketOptions { + // message oneof groups + pub options: ::std::option::Option, + // special fields + // @@protoc_insertion_point(special_field:google.api.Distribution.BucketOptions.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a BucketOptions { + fn default() -> &'a BucketOptions { + ::default_instance() } } - // .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + impl BucketOptions { + pub fn new() -> BucketOptions { + ::std::default::Default::default() + } + // .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; - pub fn get_exponential_buckets(&self) -> &Distribution_BucketOptions_Exponential { - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::exponential_buckets(ref v)) => v, - _ => ::default_instance(), + pub fn linear_buckets(&self) -> &bucket_options::Linear { + match self.options { + ::std::option::Option::Some(bucket_options::Options::LinearBuckets(ref v)) => v, + _ => ::default_instance(), + } } - } - pub fn clear_exponential_buckets(&mut self) { - self.options = ::std::option::Option::None; - } - pub fn has_exponential_buckets(&self) -> bool { - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::exponential_buckets(..)) => true, - _ => false, + pub fn clear_linear_buckets(&mut self) { + self.options = ::std::option::Option::None; } - } - - // Param is passed by value, moved - pub fn set_exponential_buckets(&mut self, v: Distribution_BucketOptions_Exponential) { - self.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::exponential_buckets(v)) - } - // Mutable pointer to the field. - pub fn mut_exponential_buckets(&mut self) -> &mut Distribution_BucketOptions_Exponential { - if let ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::exponential_buckets(_)) = self.options { - } else { - self.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::exponential_buckets(Distribution_BucketOptions_Exponential::new())); + pub fn has_linear_buckets(&self) -> bool { + match self.options { + ::std::option::Option::Some(bucket_options::Options::LinearBuckets(..)) => true, + _ => false, + } } - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::exponential_buckets(ref mut v)) => v, - _ => panic!(), + + // Param is passed by value, moved + pub fn set_linear_buckets(&mut self, v: bucket_options::Linear) { + self.options = ::std::option::Option::Some(bucket_options::Options::LinearBuckets(v)) } - } - // Take field - pub fn take_exponential_buckets(&mut self) -> Distribution_BucketOptions_Exponential { - if self.has_exponential_buckets() { - match self.options.take() { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::exponential_buckets(v)) => v, + // Mutable pointer to the field. + pub fn mut_linear_buckets(&mut self) -> &mut bucket_options::Linear { + if let ::std::option::Option::Some(bucket_options::Options::LinearBuckets(_)) = self.options { + } else { + self.options = ::std::option::Option::Some(bucket_options::Options::LinearBuckets(bucket_options::Linear::new())); + } + match self.options { + ::std::option::Option::Some(bucket_options::Options::LinearBuckets(ref mut v)) => v, _ => panic!(), } - } else { - Distribution_BucketOptions_Exponential::new() } - } - // .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + // Take field + pub fn take_linear_buckets(&mut self) -> bucket_options::Linear { + if self.has_linear_buckets() { + match self.options.take() { + ::std::option::Option::Some(bucket_options::Options::LinearBuckets(v)) => v, + _ => panic!(), + } + } else { + bucket_options::Linear::new() + } + } + // .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; - pub fn get_explicit_buckets(&self) -> &Distribution_BucketOptions_Explicit { - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::explicit_buckets(ref v)) => v, - _ => ::default_instance(), + pub fn exponential_buckets(&self) -> &bucket_options::Exponential { + match self.options { + ::std::option::Option::Some(bucket_options::Options::ExponentialBuckets(ref v)) => v, + _ => ::default_instance(), + } } - } - pub fn clear_explicit_buckets(&mut self) { - self.options = ::std::option::Option::None; - } - pub fn has_explicit_buckets(&self) -> bool { - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::explicit_buckets(..)) => true, - _ => false, + pub fn clear_exponential_buckets(&mut self) { + self.options = ::std::option::Option::None; } - } - // Param is passed by value, moved - pub fn set_explicit_buckets(&mut self, v: Distribution_BucketOptions_Explicit) { - self.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::explicit_buckets(v)) - } - - // Mutable pointer to the field. - pub fn mut_explicit_buckets(&mut self) -> &mut Distribution_BucketOptions_Explicit { - if let ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::explicit_buckets(_)) = self.options { - } else { - self.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::explicit_buckets(Distribution_BucketOptions_Explicit::new())); + pub fn has_exponential_buckets(&self) -> bool { + match self.options { + ::std::option::Option::Some(bucket_options::Options::ExponentialBuckets(..)) => true, + _ => false, + } } - match self.options { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::explicit_buckets(ref mut v)) => v, - _ => panic!(), + + // Param is passed by value, moved + pub fn set_exponential_buckets(&mut self, v: bucket_options::Exponential) { + self.options = ::std::option::Option::Some(bucket_options::Options::ExponentialBuckets(v)) } - } - // Take field - pub fn take_explicit_buckets(&mut self) -> Distribution_BucketOptions_Explicit { - if self.has_explicit_buckets() { - match self.options.take() { - ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::explicit_buckets(v)) => v, + // Mutable pointer to the field. + pub fn mut_exponential_buckets(&mut self) -> &mut bucket_options::Exponential { + if let ::std::option::Option::Some(bucket_options::Options::ExponentialBuckets(_)) = self.options { + } else { + self.options = ::std::option::Option::Some(bucket_options::Options::ExponentialBuckets(bucket_options::Exponential::new())); + } + match self.options { + ::std::option::Option::Some(bucket_options::Options::ExponentialBuckets(ref mut v)) => v, _ => panic!(), } - } else { - Distribution_BucketOptions_Explicit::new() } - } -} -impl ::protobuf::Message for Distribution_BucketOptions { - fn is_initialized(&self) -> bool { - if let Some(Distribution_BucketOptions_oneof_options::linear_buckets(ref v)) = self.options { - if !v.is_initialized() { - return false; - } - } - if let Some(Distribution_BucketOptions_oneof_options::exponential_buckets(ref v)) = self.options { - if !v.is_initialized() { - return false; + // Take field + pub fn take_exponential_buckets(&mut self) -> bucket_options::Exponential { + if self.has_exponential_buckets() { + match self.options.take() { + ::std::option::Option::Some(bucket_options::Options::ExponentialBuckets(v)) => v, + _ => panic!(), + } + } else { + bucket_options::Exponential::new() } } - if let Some(Distribution_BucketOptions_oneof_options::explicit_buckets(ref v)) = self.options { - if !v.is_initialized() { - return false; + + // .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + + pub fn explicit_buckets(&self) -> &bucket_options::Explicit { + match self.options { + ::std::option::Option::Some(bucket_options::Options::ExplicitBuckets(ref v)) => v, + _ => ::default_instance(), } } - 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.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::linear_buckets(is.read_message()?)); - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::exponential_buckets(is.read_message()?)); - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.options = ::std::option::Option::Some(Distribution_BucketOptions_oneof_options::explicit_buckets(is.read_message()?)); - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; + pub fn clear_explicit_buckets(&mut self) { + self.options = ::std::option::Option::None; } - ::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.options { - match v { - &Distribution_BucketOptions_oneof_options::linear_buckets(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, - &Distribution_BucketOptions_oneof_options::exponential_buckets(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, - &Distribution_BucketOptions_oneof_options::explicit_buckets(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, - }; + pub fn has_explicit_buckets(&self) -> bool { + match self.options { + ::std::option::Option::Some(bucket_options::Options::ExplicitBuckets(..)) => true, + _ => false, + } } - 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.options { - match v { - &Distribution_BucketOptions_oneof_options::linear_buckets(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)?; - }, - &Distribution_BucketOptions_oneof_options::exponential_buckets(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)?; - }, - &Distribution_BucketOptions_oneof_options::explicit_buckets(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)?; - }, - }; + // Param is passed by value, moved + pub fn set_explicit_buckets(&mut self, v: bucket_options::Explicit) { + self.options = ::std::option::Option::Some(bucket_options::Options::ExplicitBuckets(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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } + // Mutable pointer to the field. + pub fn mut_explicit_buckets(&mut self) -> &mut bucket_options::Explicit { + if let ::std::option::Option::Some(bucket_options::Options::ExplicitBuckets(_)) = self.options { + } else { + self.options = ::std::option::Option::Some(bucket_options::Options::ExplicitBuckets(bucket_options::Explicit::new())); + } + match self.options { + ::std::option::Option::Some(bucket_options::Options::ExplicitBuckets(ref mut v)) => v, + _ => panic!(), + } + } - fn new() -> Distribution_BucketOptions { - Distribution_BucketOptions::new() - } + // Take field + pub fn take_explicit_buckets(&mut self) -> bucket_options::Explicit { + if self.has_explicit_buckets() { + match self.options.take() { + ::std::option::Option::Some(bucket_options::Options::ExplicitBuckets(v)) => v, + _ => panic!(), + } + } else { + bucket_options::Explicit::new() + } + } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Distribution_BucketOptions_Linear>( + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(1); + fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, bucket_options::Linear>( "linear_buckets", - Distribution_BucketOptions::has_linear_buckets, - Distribution_BucketOptions::get_linear_buckets, + BucketOptions::has_linear_buckets, + BucketOptions::linear_buckets, + BucketOptions::mut_linear_buckets, + BucketOptions::set_linear_buckets, )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Distribution_BucketOptions_Exponential>( + fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, bucket_options::Exponential>( "exponential_buckets", - Distribution_BucketOptions::has_exponential_buckets, - Distribution_BucketOptions::get_exponential_buckets, + BucketOptions::has_exponential_buckets, + BucketOptions::exponential_buckets, + BucketOptions::mut_exponential_buckets, + BucketOptions::set_exponential_buckets, )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Distribution_BucketOptions_Explicit>( + fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, bucket_options::Explicit>( "explicit_buckets", - Distribution_BucketOptions::has_explicit_buckets, - Distribution_BucketOptions::get_explicit_buckets, + BucketOptions::has_explicit_buckets, + BucketOptions::explicit_buckets, + BucketOptions::mut_explicit_buckets, + BucketOptions::set_explicit_buckets, )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( + oneofs.push(bucket_options::Options::generated_oneof_descriptor_data()); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Distribution.BucketOptions", fields, - file_descriptor_proto() + oneofs, ) - }) - } - - fn default_instance() -> &'static Distribution_BucketOptions { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Distribution_BucketOptions::new) - } -} - -impl ::protobuf::Clear for Distribution_BucketOptions { - fn clear(&mut self) { - self.options = ::std::option::Option::None; - self.options = ::std::option::Option::None; - self.options = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for Distribution_BucketOptions { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Distribution_BucketOptions { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct Distribution_BucketOptions_Linear { - // message fields - pub num_finite_buckets: i32, - pub width: f64, - pub offset: f64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Distribution_BucketOptions_Linear { - fn default() -> &'a Distribution_BucketOptions_Linear { - ::default_instance() - } -} - -impl Distribution_BucketOptions_Linear { - pub fn new() -> Distribution_BucketOptions_Linear { - ::std::default::Default::default() - } - - // int32 num_finite_buckets = 1; - - - pub fn get_num_finite_buckets(&self) -> i32 { - self.num_finite_buckets - } - pub fn clear_num_finite_buckets(&mut self) { - self.num_finite_buckets = 0; - } - - // Param is passed by value, moved - pub fn set_num_finite_buckets(&mut self, v: i32) { - self.num_finite_buckets = v; - } - - // double width = 2; - - - pub fn get_width(&self) -> f64 { - self.width - } - pub fn clear_width(&mut self) { - self.width = 0.; - } - - // Param is passed by value, moved - pub fn set_width(&mut self, v: f64) { - self.width = v; - } - - // double offset = 3; - - - pub fn get_offset(&self) -> f64 { - self.offset - } - pub fn clear_offset(&mut self) { - self.offset = 0.; - } - - // Param is passed by value, moved - pub fn set_offset(&mut self, v: f64) { - self.offset = v; - } -} - -impl ::protobuf::Message for Distribution_BucketOptions_Linear { - 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 => { - 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.num_finite_buckets = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.width = tmp; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.offset = 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; - if self.num_finite_buckets != 0 { - my_size += ::protobuf::rt::value_size(1, self.num_finite_buckets, ::protobuf::wire_format::WireTypeVarint); - } - if self.width != 0. { - my_size += 9; - } - if self.offset != 0. { - my_size += 9; - } - 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.num_finite_buckets != 0 { - os.write_int32(1, self.num_finite_buckets)?; - } - if self.width != 0. { - os.write_double(2, self.width)?; } - if self.offset != 0. { - os.write_double(3, self.offset)?; - } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Distribution_BucketOptions_Linear { - Distribution_BucketOptions_Linear::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( - "num_finite_buckets", - |m: &Distribution_BucketOptions_Linear| { &m.num_finite_buckets }, - |m: &mut Distribution_BucketOptions_Linear| { &mut m.num_finite_buckets }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "width", - |m: &Distribution_BucketOptions_Linear| { &m.width }, - |m: &mut Distribution_BucketOptions_Linear| { &mut m.width }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "offset", - |m: &Distribution_BucketOptions_Linear| { &m.offset }, - |m: &mut Distribution_BucketOptions_Linear| { &mut m.offset }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Distribution.BucketOptions.Linear", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static Distribution_BucketOptions_Linear { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Distribution_BucketOptions_Linear::new) - } -} - -impl ::protobuf::Clear for Distribution_BucketOptions_Linear { - fn clear(&mut self) { - self.num_finite_buckets = 0; - self.width = 0.; - self.offset = 0.; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for Distribution_BucketOptions_Linear { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Distribution_BucketOptions_Linear { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct Distribution_BucketOptions_Exponential { - // message fields - pub num_finite_buckets: i32, - pub growth_factor: f64, - pub scale: f64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Distribution_BucketOptions_Exponential { - fn default() -> &'a Distribution_BucketOptions_Exponential { - ::default_instance() - } -} - -impl Distribution_BucketOptions_Exponential { - pub fn new() -> Distribution_BucketOptions_Exponential { - ::std::default::Default::default() - } - - // int32 num_finite_buckets = 1; - - - pub fn get_num_finite_buckets(&self) -> i32 { - self.num_finite_buckets - } - pub fn clear_num_finite_buckets(&mut self) { - self.num_finite_buckets = 0; - } - - // Param is passed by value, moved - pub fn set_num_finite_buckets(&mut self, v: i32) { - self.num_finite_buckets = v; } - // double growth_factor = 2; - - - pub fn get_growth_factor(&self) -> f64 { - self.growth_factor - } - pub fn clear_growth_factor(&mut self) { - self.growth_factor = 0.; - } - - // Param is passed by value, moved - pub fn set_growth_factor(&mut self, v: f64) { - self.growth_factor = v; - } - - // double scale = 3; - - - pub fn get_scale(&self) -> f64 { - self.scale - } - pub fn clear_scale(&mut self) { - self.scale = 0.; - } - - // Param is passed by value, moved - pub fn set_scale(&mut self, v: f64) { - self.scale = v; - } -} - -impl ::protobuf::Message for Distribution_BucketOptions_Exponential { - 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 => { - 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.num_finite_buckets = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.growth_factor = tmp; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.scale = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } + impl ::protobuf::Message for BucketOptions { + const NAME: &'static str = "BucketOptions"; - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.num_finite_buckets != 0 { - my_size += ::protobuf::rt::value_size(1, self.num_finite_buckets, ::protobuf::wire_format::WireTypeVarint); + fn is_initialized(&self) -> bool { + true } - if self.growth_factor != 0. { - my_size += 9; + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.options = ::std::option::Option::Some(bucket_options::Options::LinearBuckets(is.read_message()?)); + }, + 18 => { + self.options = ::std::option::Option::Some(bucket_options::Options::ExponentialBuckets(is.read_message()?)); + }, + 26 => { + self.options = ::std::option::Option::Some(bucket_options::Options::ExplicitBuckets(is.read_message()?)); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) } - if self.scale != 0. { - my_size += 9; + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let ::std::option::Option::Some(ref v) = self.options { + match v { + &bucket_options::Options::LinearBuckets(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }, + &bucket_options::Options::ExponentialBuckets(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }, + &bucket_options::Options::ExplicitBuckets(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size } - 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.num_finite_buckets != 0 { - os.write_int32(1, self.num_finite_buckets)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let ::std::option::Option::Some(ref v) = self.options { + match v { + &bucket_options::Options::LinearBuckets(ref v) => { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + }, + &bucket_options::Options::ExponentialBuckets(ref v) => { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; + }, + &bucket_options::Options::ExplicitBuckets(ref v) => { + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + }, + }; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) } - if self.growth_factor != 0. { - os.write_double(2, self.growth_factor)?; + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - if self.scale != 0. { - os.write_double(3, self.scale)?; + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } + fn new() -> BucketOptions { + BucketOptions::new() + } - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } + fn clear(&mut self) { + self.options = ::std::option::Option::None; + self.options = ::std::option::Option::None; + self.options = ::std::option::Option::None; + self.special_fields.clear(); + } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields + fn default_instance() -> &'static BucketOptions { + static instance: BucketOptions = BucketOptions { + options: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + impl ::protobuf::MessageFull for BucketOptions { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Distribution.BucketOptions").unwrap()).clone() + } } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + impl ::std::fmt::Display for BucketOptions { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } - fn new() -> Distribution_BucketOptions_Exponential { - Distribution_BucketOptions_Exponential::new() + impl ::protobuf::reflect::ProtobufValue for BucketOptions { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( - "num_finite_buckets", - |m: &Distribution_BucketOptions_Exponential| { &m.num_finite_buckets }, - |m: &mut Distribution_BucketOptions_Exponential| { &mut m.num_finite_buckets }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "growth_factor", - |m: &Distribution_BucketOptions_Exponential| { &m.growth_factor }, - |m: &mut Distribution_BucketOptions_Exponential| { &mut m.growth_factor }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "scale", - |m: &Distribution_BucketOptions_Exponential| { &m.scale }, - |m: &mut Distribution_BucketOptions_Exponential| { &mut m.scale }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Distribution.BucketOptions.Exponential", - fields, - file_descriptor_proto() - ) - }) - } + /// Nested message and enums of message `BucketOptions` + pub mod bucket_options { - fn default_instance() -> &'static Distribution_BucketOptions_Exponential { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Distribution_BucketOptions_Exponential::new) - } -} + #[derive(Clone,PartialEq,Debug)] + #[non_exhaustive] + // @@protoc_insertion_point(oneof:google.api.Distribution.BucketOptions.options) + pub enum Options { + // @@protoc_insertion_point(oneof_field:google.api.Distribution.BucketOptions.linear_buckets) + LinearBuckets(Linear), + // @@protoc_insertion_point(oneof_field:google.api.Distribution.BucketOptions.exponential_buckets) + ExponentialBuckets(Exponential), + // @@protoc_insertion_point(oneof_field:google.api.Distribution.BucketOptions.explicit_buckets) + ExplicitBuckets(Explicit), + } -impl ::protobuf::Clear for Distribution_BucketOptions_Exponential { - fn clear(&mut self) { - self.num_finite_buckets = 0; - self.growth_factor = 0.; - self.scale = 0.; - self.unknown_fields.clear(); - } -} + impl ::protobuf::Oneof for Options { + } -impl ::std::fmt::Debug for Distribution_BucketOptions_Exponential { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} + impl ::protobuf::OneofFull for Options { + fn descriptor() -> ::protobuf::reflect::OneofDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| ::descriptor().oneof_by_name("options").unwrap()).clone() + } + } -impl ::protobuf::reflect::ProtobufValue for Distribution_BucketOptions_Exponential { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} + impl Options { + pub(in super::super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { + ::protobuf::reflect::GeneratedOneofDescriptorData::new::("options") + } + } + // @@protoc_insertion_point(message:google.api.Distribution.BucketOptions.Linear) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct Linear { + // message fields + /// Must be greater than 0. + // @@protoc_insertion_point(field:google.api.Distribution.BucketOptions.Linear.num_finite_buckets) + pub num_finite_buckets: i32, + /// Must be greater than 0. + // @@protoc_insertion_point(field:google.api.Distribution.BucketOptions.Linear.width) + pub width: f64, + /// Lower bound of the first bucket. + // @@protoc_insertion_point(field:google.api.Distribution.BucketOptions.Linear.offset) + pub offset: f64, + // special fields + // @@protoc_insertion_point(special_field:google.api.Distribution.BucketOptions.Linear.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } -#[derive(PartialEq,Clone,Default)] -pub struct Distribution_BucketOptions_Explicit { - // message fields - pub bounds: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} + impl<'a> ::std::default::Default for &'a Linear { + fn default() -> &'a Linear { + ::default_instance() + } + } -impl<'a> ::std::default::Default for &'a Distribution_BucketOptions_Explicit { - fn default() -> &'a Distribution_BucketOptions_Explicit { - ::default_instance() - } -} + impl Linear { + pub fn new() -> Linear { + ::std::default::Default::default() + } -impl Distribution_BucketOptions_Explicit { - pub fn new() -> Distribution_BucketOptions_Explicit { - ::std::default::Default::default() - } + pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "num_finite_buckets", + |m: &Linear| { &m.num_finite_buckets }, + |m: &mut Linear| { &mut m.num_finite_buckets }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "width", + |m: &Linear| { &m.width }, + |m: &mut Linear| { &mut m.width }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "offset", + |m: &Linear| { &m.offset }, + |m: &mut Linear| { &mut m.offset }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Distribution.BucketOptions.Linear", + fields, + oneofs, + ) + } + } - // repeated double bounds = 1; + impl ::protobuf::Message for Linear { + const NAME: &'static str = "Linear"; + fn is_initialized(&self) -> bool { + true + } - pub fn get_bounds(&self) -> &[f64] { - &self.bounds - } - pub fn clear_bounds(&mut self) { - self.bounds.clear(); - } + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.num_finite_buckets = is.read_int32()?; + }, + 17 => { + self.width = is.read_double()?; + }, + 25 => { + self.offset = is.read_double()?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } - // Param is passed by value, moved - pub fn set_bounds(&mut self, v: ::std::vec::Vec) { - self.bounds = v; - } + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if self.num_finite_buckets != 0 { + my_size += ::protobuf::rt::int32_size(1, self.num_finite_buckets); + } + if self.width != 0. { + my_size += 1 + 8; + } + if self.offset != 0. { + my_size += 1 + 8; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } - // Mutable pointer to the field. - pub fn mut_bounds(&mut self) -> &mut ::std::vec::Vec { - &mut self.bounds - } + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if self.num_finite_buckets != 0 { + os.write_int32(1, self.num_finite_buckets)?; + } + if self.width != 0. { + os.write_double(2, self.width)?; + } + if self.offset != 0. { + os.write_double(3, self.offset)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } - // Take field - pub fn take_bounds(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.bounds, ::std::vec::Vec::new()) - } -} + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } -impl ::protobuf::Message for Distribution_BucketOptions_Explicit { - fn is_initialized(&self) -> bool { - true - } + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } - 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_double_into(wire_type, is, &mut self.bounds)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } + fn new() -> Linear { + Linear::new() + } - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += 9 * self.bounds.len() as u32; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } + fn clear(&mut self) { + self.num_finite_buckets = 0; + self.width = 0.; + self.offset = 0.; + self.special_fields.clear(); + } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.bounds { - os.write_double(1, *v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } + fn default_instance() -> &'static Linear { + static instance: Linear = Linear { + num_finite_buckets: 0, + width: 0., + offset: 0., + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } + } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } + impl ::protobuf::MessageFull for Linear { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("Distribution.BucketOptions.Linear").unwrap()).clone() + } + } - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } + impl ::std::fmt::Display for Linear { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } + } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } + impl ::protobuf::reflect::ProtobufValue for Linear { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; + } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } + // @@protoc_insertion_point(message:google.api.Distribution.BucketOptions.Exponential) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct Exponential { + // message fields + /// Must be greater than 0. + // @@protoc_insertion_point(field:google.api.Distribution.BucketOptions.Exponential.num_finite_buckets) + pub num_finite_buckets: i32, + /// Must be greater than 1. + // @@protoc_insertion_point(field:google.api.Distribution.BucketOptions.Exponential.growth_factor) + pub growth_factor: f64, + /// Must be greater than 0. + // @@protoc_insertion_point(field:google.api.Distribution.BucketOptions.Exponential.scale) + pub scale: f64, + // special fields + // @@protoc_insertion_point(special_field:google.api.Distribution.BucketOptions.Exponential.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } + impl<'a> ::std::default::Default for &'a Exponential { + fn default() -> &'a Exponential { + ::default_instance() + } + } - fn new() -> Distribution_BucketOptions_Explicit { - Distribution_BucketOptions_Explicit::new() - } + impl Exponential { + pub fn new() -> Exponential { + ::std::default::Default::default() + } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( - "bounds", - |m: &Distribution_BucketOptions_Explicit| { &m.bounds }, - |m: &mut Distribution_BucketOptions_Explicit| { &mut m.bounds }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Distribution.BucketOptions.Explicit", - fields, - file_descriptor_proto() - ) - }) - } + pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "num_finite_buckets", + |m: &Exponential| { &m.num_finite_buckets }, + |m: &mut Exponential| { &mut m.num_finite_buckets }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "growth_factor", + |m: &Exponential| { &m.growth_factor }, + |m: &mut Exponential| { &mut m.growth_factor }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "scale", + |m: &Exponential| { &m.scale }, + |m: &mut Exponential| { &mut m.scale }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Distribution.BucketOptions.Exponential", + fields, + oneofs, + ) + } + } - fn default_instance() -> &'static Distribution_BucketOptions_Explicit { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Distribution_BucketOptions_Explicit::new) - } -} + impl ::protobuf::Message for Exponential { + const NAME: &'static str = "Exponential"; -impl ::protobuf::Clear for Distribution_BucketOptions_Explicit { - fn clear(&mut self) { - self.bounds.clear(); - self.unknown_fields.clear(); - } -} + fn is_initialized(&self) -> bool { + true + } -impl ::std::fmt::Debug for Distribution_BucketOptions_Explicit { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.num_finite_buckets = is.read_int32()?; + }, + 17 => { + self.growth_factor = is.read_double()?; + }, + 25 => { + self.scale = is.read_double()?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } -impl ::protobuf::reflect::ProtobufValue for Distribution_BucketOptions_Explicit { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if self.num_finite_buckets != 0 { + my_size += ::protobuf::rt::int32_size(1, self.num_finite_buckets); + } + if self.growth_factor != 0. { + my_size += 1 + 8; + } + if self.scale != 0. { + my_size += 1 + 8; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } -#[derive(PartialEq,Clone,Default)] -pub struct Distribution_Exemplar { - // message fields - pub value: f64, - pub timestamp: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, - pub attachments: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if self.num_finite_buckets != 0 { + os.write_int32(1, self.num_finite_buckets)?; + } + if self.growth_factor != 0. { + os.write_double(2, self.growth_factor)?; + } + if self.scale != 0. { + os.write_double(3, self.scale)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } -impl<'a> ::std::default::Default for &'a Distribution_Exemplar { - fn default() -> &'a Distribution_Exemplar { - ::default_instance() - } -} + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } -impl Distribution_Exemplar { - pub fn new() -> Distribution_Exemplar { - ::std::default::Default::default() - } + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } - // double value = 1; + fn new() -> Exponential { + Exponential::new() + } + fn clear(&mut self) { + self.num_finite_buckets = 0; + self.growth_factor = 0.; + self.scale = 0.; + self.special_fields.clear(); + } - pub fn get_value(&self) -> f64 { - self.value - } - pub fn clear_value(&mut self) { - self.value = 0.; - } + fn default_instance() -> &'static Exponential { + static instance: Exponential = Exponential { + num_finite_buckets: 0, + growth_factor: 0., + scale: 0., + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } + } - // Param is passed by value, moved - pub fn set_value(&mut self, v: f64) { - self.value = v; - } + impl ::protobuf::MessageFull for Exponential { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("Distribution.BucketOptions.Exponential").unwrap()).clone() + } + } - // .google.protobuf.Timestamp timestamp = 2; + impl ::std::fmt::Display for Exponential { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } + } + impl ::protobuf::reflect::ProtobufValue for Exponential { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; + } - pub fn get_timestamp(&self) -> &::protobuf::well_known_types::Timestamp { - self.timestamp.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Timestamp as ::protobuf::Message>::default_instance()) - } - pub fn clear_timestamp(&mut self) { - self.timestamp.clear(); - } + // @@protoc_insertion_point(message:google.api.Distribution.BucketOptions.Explicit) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct Explicit { + // message fields + /// The values must be monotonically increasing. + // @@protoc_insertion_point(field:google.api.Distribution.BucketOptions.Explicit.bounds) + pub bounds: ::std::vec::Vec, + // special fields + // @@protoc_insertion_point(special_field:google.api.Distribution.BucketOptions.Explicit.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } - pub fn has_timestamp(&self) -> bool { - self.timestamp.is_some() - } + impl<'a> ::std::default::Default for &'a Explicit { + fn default() -> &'a Explicit { + ::default_instance() + } + } - // Param is passed by value, moved - pub fn set_timestamp(&mut self, v: ::protobuf::well_known_types::Timestamp) { - self.timestamp = ::protobuf::SingularPtrField::some(v); - } + impl Explicit { + pub fn new() -> Explicit { + ::std::default::Default::default() + } - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_timestamp(&mut self) -> &mut ::protobuf::well_known_types::Timestamp { - if self.timestamp.is_none() { - self.timestamp.set_default(); + pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "bounds", + |m: &Explicit| { &m.bounds }, + |m: &mut Explicit| { &mut m.bounds }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Distribution.BucketOptions.Explicit", + fields, + oneofs, + ) + } } - self.timestamp.as_mut().unwrap() - } - // Take field - pub fn take_timestamp(&mut self) -> ::protobuf::well_known_types::Timestamp { - self.timestamp.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) - } + impl ::protobuf::Message for Explicit { + const NAME: &'static str = "Explicit"; - // repeated .google.protobuf.Any attachments = 3; + fn is_initialized(&self) -> bool { + true + } + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + is.read_repeated_packed_double_into(&mut self.bounds)?; + }, + 9 => { + self.bounds.push(is.read_double()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } - pub fn get_attachments(&self) -> &[::protobuf::well_known_types::Any] { - &self.attachments - } - pub fn clear_attachments(&mut self) { - self.attachments.clear(); - } + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + my_size += 9 * self.bounds.len() as u64; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } - // Param is passed by value, moved - pub fn set_attachments(&mut self, v: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>) { - self.attachments = v; - } + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + for v in &self.bounds { + os.write_double(1, *v)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } - // Mutable pointer to the field. - pub fn mut_attachments(&mut self) -> &mut ::protobuf::RepeatedField<::protobuf::well_known_types::Any> { - &mut self.attachments - } + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } - // Take field - pub fn take_attachments(&mut self) -> ::protobuf::RepeatedField<::protobuf::well_known_types::Any> { - ::std::mem::replace(&mut self.attachments, ::protobuf::RepeatedField::new()) - } -} + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } -impl ::protobuf::Message for Distribution_Exemplar { - fn is_initialized(&self) -> bool { - for v in &self.timestamp { - if !v.is_initialized() { - return false; + fn new() -> Explicit { + Explicit::new() } - }; - for v in &self.attachments { - if !v.is_initialized() { - return false; + + fn clear(&mut self) { + self.bounds.clear(); + self.special_fields.clear(); } - }; - 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::WireTypeFixed64 { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_double()?; - self.value = tmp; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.timestamp)?; - }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attachments)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; + fn default_instance() -> &'static Explicit { + static instance: Explicit = Explicit { + bounds: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } } - ::std::result::Result::Ok(()) - } - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.value != 0. { - my_size += 9; - } - if let Some(ref v) = self.timestamp.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + impl ::protobuf::MessageFull for Explicit { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("Distribution.BucketOptions.Explicit").unwrap()).clone() + } } - for value in &self.attachments { - 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.value != 0. { - os.write_double(1, self.value)?; - } - if let Some(ref v) = self.timestamp.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)?; + impl ::std::fmt::Display for Explicit { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } - for v in &self.attachments { - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + impl ::protobuf::reflect::ProtobufValue for Explicit { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; + } } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + /// Exemplars are example points that may be used to annotate aggregated + /// distribution values. They are metadata that gives information about a + /// particular value added to a Distribution bucket, such as a trace ID that + /// was active when a value was added. They may contain further information, + /// such as a example values and timestamps, origin, etc. + // @@protoc_insertion_point(message:google.api.Distribution.Exemplar) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct Exemplar { + // message fields + /// Value of the exemplar point. This value determines to which bucket the + /// exemplar belongs. + // @@protoc_insertion_point(field:google.api.Distribution.Exemplar.value) + pub value: f64, + /// The observation (sampling) time of the above value. + // @@protoc_insertion_point(field:google.api.Distribution.Exemplar.timestamp) + pub timestamp: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, + // @@protoc_insertion_point(field:google.api.Distribution.Exemplar.attachments) + pub attachments: ::std::vec::Vec<::protobuf::well_known_types::any::Any>, + // special fields + // @@protoc_insertion_point(special_field:google.api.Distribution.Exemplar.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a Exemplar { + fn default() -> &'a Exemplar { + ::default_instance() + } } - fn new() -> Distribution_Exemplar { - Distribution_Exemplar::new() - } + impl Exemplar { + pub fn new() -> Exemplar { + ::std::default::Default::default() + } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeDouble>( + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "value", - |m: &Distribution_Exemplar| { &m.value }, - |m: &mut Distribution_Exemplar| { &mut m.value }, + |m: &Exemplar| { &m.value }, + |m: &mut Exemplar| { &mut m.value }, )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( "timestamp", - |m: &Distribution_Exemplar| { &m.timestamp }, - |m: &mut Distribution_Exemplar| { &mut m.timestamp }, + |m: &Exemplar| { &m.timestamp }, + |m: &mut Exemplar| { &mut m.timestamp }, )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>( + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "attachments", - |m: &Distribution_Exemplar| { &m.attachments }, - |m: &mut Distribution_Exemplar| { &mut m.attachments }, + |m: &Exemplar| { &m.attachments }, + |m: &mut Exemplar| { &mut m.attachments }, )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "Distribution.Exemplar", fields, - file_descriptor_proto() + oneofs, ) - }) + } } - fn default_instance() -> &'static Distribution_Exemplar { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Distribution_Exemplar::new) + impl ::protobuf::Message for Exemplar { + const NAME: &'static str = "Exemplar"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 9 => { + self.value = is.read_double()?; + }, + 18 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.timestamp)?; + }, + 26 => { + self.attachments.push(is.read_message()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if self.value != 0. { + my_size += 1 + 8; + } + if let Some(v) = self.timestamp.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + for value in &self.attachments { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if self.value != 0. { + os.write_double(1, self.value)?; + } + if let Some(v) = self.timestamp.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; + } + for v in &self.attachments { + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> Exemplar { + Exemplar::new() + } + + fn clear(&mut self) { + self.value = 0.; + self.timestamp.clear(); + self.attachments.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static Exemplar { + static instance: Exemplar = Exemplar { + value: 0., + timestamp: ::protobuf::MessageField::none(), + attachments: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } } -} -impl ::protobuf::Clear for Distribution_Exemplar { - fn clear(&mut self) { - self.value = 0.; - self.timestamp.clear(); - self.attachments.clear(); - self.unknown_fields.clear(); + impl ::protobuf::MessageFull for Exemplar { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Distribution.Exemplar").unwrap()).clone() + } } -} -impl ::std::fmt::Debug for Distribution_Exemplar { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + impl ::std::fmt::Display for Exemplar { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } -} -impl ::protobuf::reflect::ProtobufValue for Distribution_Exemplar { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) + impl ::protobuf::reflect::ProtobufValue for Exemplar { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } } @@ -1882,7 +1452,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x0battachmentsBq\n\x0ecom.google.apiB\x11DistributionProtoP\x01ZCgoogle\ .golang.org/genproto/googleapis/api/distribution;distribution\xa2\x02\ \x04GAPIJ\x85D\n\x07\x12\x05\x0e\0\xd4\x01\x01\n\xbc\x04\n\x01\x0c\x12\ - \x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Google\x20LLC\n\n\x20Lic\ + \x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20Google\x20LLC\n\n\x20Lic\ ensed\x20under\x20the\x20Apache\x20License,\x20Version\x202.0\x20(the\ \x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\x20file\x20excep\ t\x20in\x20compliance\x20with\x20the\x20License.\n\x20You\x20may\x20obta\ @@ -2121,14 +1691,39 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x06\x03\x12\x04\xd3\x01\x20\"b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(2); + deps.push(::protobuf::well_known_types::any::file_descriptor().clone()); + deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(7); + messages.push(Distribution::generated_message_descriptor_data()); + messages.push(distribution::Range::generated_message_descriptor_data()); + messages.push(distribution::BucketOptions::generated_message_descriptor_data()); + messages.push(distribution::Exemplar::generated_message_descriptor_data()); + messages.push(distribution::bucket_options::Linear::generated_message_descriptor_data()); + messages.push(distribution::bucket_options::Exponential::generated_message_descriptor_data()); + messages.push(distribution::bucket_options::Explicit::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/documentation.rs b/googleapis-raw/src/api/documentation.rs index c0ec96e..c2da499 100644 --- a/googleapis-raw/src/api/documentation.rs +++ b/googleapis-raw/src/api/documentation.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,33 +9,54 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/documentation.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Documentation) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Documentation { // message fields + /// A short description of what the service does. The summary must be plain + /// text. It becomes the overview of the service displayed in Google Cloud + /// Console. + /// NOTE: This field is equivalent to the standard field `description`. + // @@protoc_insertion_point(field:google.api.Documentation.summary) pub summary: ::std::string::String, - pub pages: ::protobuf::RepeatedField, - pub rules: ::protobuf::RepeatedField, + /// The top level pages for the documentation set. + // @@protoc_insertion_point(field:google.api.Documentation.pages) + pub pages: ::std::vec::Vec, + /// A list of documentation rules that apply to individual API elements. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + // @@protoc_insertion_point(field:google.api.Documentation.rules) + pub rules: ::std::vec::Vec, + /// The URL to the root of documentation. + // @@protoc_insertion_point(field:google.api.Documentation.documentation_root_url) pub documentation_root_url: ::std::string::String, + /// Specifies the service root url if the default one (the service name + /// from the yaml file) is not suitable. This can be seen in any fully + /// specified service urls as well as sections that show a base that other + /// urls are relative to. + // @@protoc_insertion_point(field:google.api.Documentation.service_root_url) pub service_root_url: ::std::string::String, + // @@protoc_insertion_point(field:google.api.Documentation.overview) pub overview: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Documentation.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Documentation { @@ -48,200 +70,77 @@ impl Documentation { ::std::default::Default::default() } - // string summary = 1; - - - pub fn get_summary(&self) -> &str { - &self.summary - } - pub fn clear_summary(&mut self) { - self.summary.clear(); - } - - // Param is passed by value, moved - pub fn set_summary(&mut self, v: ::std::string::String) { - self.summary = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_summary(&mut self) -> &mut ::std::string::String { - &mut self.summary - } - - // Take field - pub fn take_summary(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.summary, ::std::string::String::new()) - } - - // repeated .google.api.Page pages = 5; - - - pub fn get_pages(&self) -> &[Page] { - &self.pages - } - pub fn clear_pages(&mut self) { - self.pages.clear(); - } - - // Param is passed by value, moved - pub fn set_pages(&mut self, v: ::protobuf::RepeatedField) { - self.pages = v; - } - - // Mutable pointer to the field. - pub fn mut_pages(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.pages - } - - // Take field - pub fn take_pages(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.pages, ::protobuf::RepeatedField::new()) - } - - // repeated .google.api.DocumentationRule rules = 3; - - - pub fn get_rules(&self) -> &[DocumentationRule] { - &self.rules - } - pub fn clear_rules(&mut self) { - self.rules.clear(); - } - - // Param is passed by value, moved - pub fn set_rules(&mut self, v: ::protobuf::RepeatedField) { - self.rules = v; - } - - // Mutable pointer to the field. - pub fn mut_rules(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.rules - } - - // Take field - pub fn take_rules(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.rules, ::protobuf::RepeatedField::new()) - } - - // string documentation_root_url = 4; - - - pub fn get_documentation_root_url(&self) -> &str { - &self.documentation_root_url - } - pub fn clear_documentation_root_url(&mut self) { - self.documentation_root_url.clear(); - } - - // Param is passed by value, moved - pub fn set_documentation_root_url(&mut self, v: ::std::string::String) { - self.documentation_root_url = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_documentation_root_url(&mut self) -> &mut ::std::string::String { - &mut self.documentation_root_url - } - - // Take field - pub fn take_documentation_root_url(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.documentation_root_url, ::std::string::String::new()) - } - - // string service_root_url = 6; - - - pub fn get_service_root_url(&self) -> &str { - &self.service_root_url - } - pub fn clear_service_root_url(&mut self) { - self.service_root_url.clear(); - } - - // Param is passed by value, moved - pub fn set_service_root_url(&mut self, v: ::std::string::String) { - self.service_root_url = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_service_root_url(&mut self) -> &mut ::std::string::String { - &mut self.service_root_url - } - - // Take field - pub fn take_service_root_url(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.service_root_url, ::std::string::String::new()) - } - - // string overview = 2; - - - pub fn get_overview(&self) -> &str { - &self.overview - } - pub fn clear_overview(&mut self) { - self.overview.clear(); - } - - // Param is passed by value, moved - pub fn set_overview(&mut self, v: ::std::string::String) { - self.overview = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_overview(&mut self) -> &mut ::std::string::String { - &mut self.overview - } - - // Take field - pub fn take_overview(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.overview, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(6); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "summary", + |m: &Documentation| { &m.summary }, + |m: &mut Documentation| { &mut m.summary }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "pages", + |m: &Documentation| { &m.pages }, + |m: &mut Documentation| { &mut m.pages }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "rules", + |m: &Documentation| { &m.rules }, + |m: &mut Documentation| { &mut m.rules }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "documentation_root_url", + |m: &Documentation| { &m.documentation_root_url }, + |m: &mut Documentation| { &mut m.documentation_root_url }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "service_root_url", + |m: &Documentation| { &m.service_root_url }, + |m: &mut Documentation| { &mut m.service_root_url }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "overview", + |m: &Documentation| { &m.overview }, + |m: &mut Documentation| { &mut m.overview }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Documentation", + fields, + oneofs, + ) } } impl ::protobuf::Message for Documentation { + const NAME: &'static str = "Documentation"; + fn is_initialized(&self) -> bool { - for v in &self.pages { - if !v.is_initialized() { - return false; - } - }; - for v in &self.rules { - 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.summary)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.summary = is.read_string()?; }, - 5 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.pages)?; + 42 => { + self.pages.push(is.read_message()?); }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.rules)?; + 26 => { + self.rules.push(is.read_message()?); }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.documentation_root_url)?; + 34 => { + self.documentation_root_url = is.read_string()?; }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.service_root_url)?; + 50 => { + self.service_root_url = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.overview)?; + 18 => { + self.overview = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -250,18 +149,18 @@ impl ::protobuf::Message for Documentation { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.summary.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.summary); } for value in &self.pages { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for value in &self.rules { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if !self.documentation_root_url.is_empty() { my_size += ::protobuf::rt::string_size(4, &self.documentation_root_url); @@ -272,24 +171,20 @@ impl ::protobuf::Message for Documentation { if !self.overview.is_empty() { my_size += ::protobuf::rt::string_size(2, &self.overview); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.summary.is_empty() { os.write_string(1, &self.summary)?; } for v in &self.pages { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; }; for v in &self.rules { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; }; if !self.documentation_root_url.is_empty() { os.write_string(4, &self.documentation_root_url)?; @@ -300,89 +195,22 @@ impl ::protobuf::Message for Documentation { if !self.overview.is_empty() { os.write_string(2, &self.overview)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Documentation { Documentation::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "summary", - |m: &Documentation| { &m.summary }, - |m: &mut Documentation| { &mut m.summary }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "pages", - |m: &Documentation| { &m.pages }, - |m: &mut Documentation| { &mut m.pages }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rules", - |m: &Documentation| { &m.rules }, - |m: &mut Documentation| { &mut m.rules }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "documentation_root_url", - |m: &Documentation| { &m.documentation_root_url }, - |m: &mut Documentation| { &mut m.documentation_root_url }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "service_root_url", - |m: &Documentation| { &m.service_root_url }, - |m: &mut Documentation| { &mut m.service_root_url }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "overview", - |m: &Documentation| { &m.overview }, - |m: &mut Documentation| { &mut m.overview }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Documentation", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static Documentation { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Documentation::new) - } -} - -impl ::protobuf::Clear for Documentation { fn clear(&mut self) { self.summary.clear(); self.pages.clear(); @@ -390,31 +218,66 @@ impl ::protobuf::Clear for Documentation { self.documentation_root_url.clear(); self.service_root_url.clear(); self.overview.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static Documentation { + static instance: Documentation = Documentation { + summary: ::std::string::String::new(), + pages: ::std::vec::Vec::new(), + rules: ::std::vec::Vec::new(), + documentation_root_url: ::std::string::String::new(), + service_root_url: ::std::string::String::new(), + overview: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for Documentation { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Documentation").unwrap()).clone() } } -impl ::std::fmt::Debug for Documentation { +impl ::std::fmt::Display for Documentation { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Documentation { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// A documentation rule provides information about individual API elements. +// @@protoc_insertion_point(message:google.api.DocumentationRule) +#[derive(PartialEq,Clone,Default,Debug)] pub struct DocumentationRule { // message fields + /// The selector is a comma-separated list of patterns for any element such as + /// a method, a field, an enum value. Each pattern is a qualified name of the + /// element which may end in "*", indicating a wildcard. Wildcards are only + /// allowed at the end and for a whole component of the qualified name, + /// i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match + /// one or more components. To specify a default for all applicable elements, + /// the whole pattern "*" is used. + // @@protoc_insertion_point(field:google.api.DocumentationRule.selector) pub selector: ::std::string::String, + /// Description of the selected proto element (e.g. a message, a method, a + /// 'service' definition, or a field). Defaults to leading & trailing comments + /// taken from the proto source definition of the proto element. + // @@protoc_insertion_point(field:google.api.DocumentationRule.description) pub description: ::std::string::String, + /// Deprecation description of the selected element(s). It can be provided if + /// an element is marked as `deprecated`. + // @@protoc_insertion_point(field:google.api.DocumentationRule.deprecation_description) pub deprecation_description: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.DocumentationRule.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a DocumentationRule { @@ -428,105 +291,53 @@ impl DocumentationRule { ::std::default::Default::default() } - // string selector = 1; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string deprecation_description = 3; - - - pub fn get_deprecation_description(&self) -> &str { - &self.deprecation_description - } - pub fn clear_deprecation_description(&mut self) { - self.deprecation_description.clear(); - } - - // Param is passed by value, moved - pub fn set_deprecation_description(&mut self, v: ::std::string::String) { - self.deprecation_description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_deprecation_description(&mut self) -> &mut ::std::string::String { - &mut self.deprecation_description - } - - // Take field - pub fn take_deprecation_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.deprecation_description, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &DocumentationRule| { &m.selector }, + |m: &mut DocumentationRule| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "description", + |m: &DocumentationRule| { &m.description }, + |m: &mut DocumentationRule| { &mut m.description }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "deprecation_description", + |m: &DocumentationRule| { &m.deprecation_description }, + |m: &mut DocumentationRule| { &mut m.deprecation_description }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "DocumentationRule", + fields, + oneofs, + ) } } impl ::protobuf::Message for DocumentationRule { + const NAME: &'static str = "DocumentationRule"; + 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.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.selector = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; + 18 => { + self.description = is.read_string()?; }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.deprecation_description)?; + 26 => { + self.deprecation_description = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -535,7 +346,7 @@ impl ::protobuf::Message for DocumentationRule { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.selector); @@ -546,12 +357,12 @@ impl ::protobuf::Message for DocumentationRule { if !self.deprecation_description.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.deprecation_description); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(1, &self.selector)?; } @@ -561,103 +372,77 @@ impl ::protobuf::Message for DocumentationRule { if !self.deprecation_description.is_empty() { os.write_string(3, &self.deprecation_description)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> DocumentationRule { DocumentationRule::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &DocumentationRule| { &m.selector }, - |m: &mut DocumentationRule| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &DocumentationRule| { &m.description }, - |m: &mut DocumentationRule| { &mut m.description }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "deprecation_description", - |m: &DocumentationRule| { &m.deprecation_description }, - |m: &mut DocumentationRule| { &mut m.deprecation_description }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "DocumentationRule", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.selector.clear(); + self.description.clear(); + self.deprecation_description.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static DocumentationRule { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DocumentationRule::new) + static instance: DocumentationRule = DocumentationRule { + selector: ::std::string::String::new(), + description: ::std::string::String::new(), + deprecation_description: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for DocumentationRule { - fn clear(&mut self) { - self.selector.clear(); - self.description.clear(); - self.deprecation_description.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for DocumentationRule { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("DocumentationRule").unwrap()).clone() } } -impl ::std::fmt::Debug for DocumentationRule { +impl ::std::fmt::Display for DocumentationRule { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DocumentationRule { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Represents a documentation page. A page can contain subpages to represent +/// nested documentation set structure. +// @@protoc_insertion_point(message:google.api.Page) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Page { // message fields + // @@protoc_insertion_point(field:google.api.Page.name) pub name: ::std::string::String, + /// The Markdown content of the page. You can use (== include {path} + /// ==) to include content from a Markdown file. The content can be + /// used to produce the documentation page such as HTML format page. + // @@protoc_insertion_point(field:google.api.Page.content) pub content: ::std::string::String, - pub subpages: ::protobuf::RepeatedField, + /// Subpages of this page. The order of subpages specified here will be + /// honored in the generated docset. + // @@protoc_insertion_point(field:google.api.Page.subpages) + pub subpages: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Page.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Page { @@ -671,109 +456,53 @@ impl Page { ::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 content = 2; - - - pub fn get_content(&self) -> &str { - &self.content - } - pub fn clear_content(&mut self) { - self.content.clear(); - } - - // Param is passed by value, moved - pub fn set_content(&mut self, v: ::std::string::String) { - self.content = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_content(&mut self) -> &mut ::std::string::String { - &mut self.content - } - - // Take field - pub fn take_content(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.content, ::std::string::String::new()) - } - - // repeated .google.api.Page subpages = 3; - - - pub fn get_subpages(&self) -> &[Page] { - &self.subpages - } - pub fn clear_subpages(&mut self) { - self.subpages.clear(); - } - - // Param is passed by value, moved - pub fn set_subpages(&mut self, v: ::protobuf::RepeatedField) { - self.subpages = v; - } - - // Mutable pointer to the field. - pub fn mut_subpages(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.subpages - } - - // Take field - pub fn take_subpages(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.subpages, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &Page| { &m.name }, + |m: &mut Page| { &mut m.name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "content", + |m: &Page| { &m.content }, + |m: &mut Page| { &mut m.content }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "subpages", + |m: &Page| { &m.subpages }, + |m: &mut Page| { &mut m.subpages }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Page", + fields, + oneofs, + ) } } impl ::protobuf::Message for Page { + const NAME: &'static str = "Page"; + fn is_initialized(&self) -> bool { - for v in &self.subpages { - 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)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.name = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.content)?; + 18 => { + self.content = is.read_string()?; }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.subpages)?; + 26 => { + self.subpages.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -782,7 +511,7 @@ impl ::protobuf::Message for Page { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.name); @@ -792,14 +521,14 @@ impl ::protobuf::Message for Page { } for value in &self.subpages { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.name.is_empty() { os.write_string(1, &self.name)?; } @@ -807,96 +536,57 @@ impl ::protobuf::Message for Page { os.write_string(2, &self.content)?; } for v in &self.subpages { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Page { Page::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Page| { &m.name }, - |m: &mut Page| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "content", - |m: &Page| { &m.content }, - |m: &mut Page| { &mut m.content }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "subpages", - |m: &Page| { &m.subpages }, - |m: &mut Page| { &mut m.subpages }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Page", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.name.clear(); + self.content.clear(); + self.subpages.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Page { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Page::new) + static instance: Page = Page { + name: ::std::string::String::new(), + content: ::std::string::String::new(), + subpages: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Page { - fn clear(&mut self) { - self.name.clear(); - self.content.clear(); - self.subpages.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Page { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Page").unwrap()).clone() } } -impl ::std::fmt::Debug for Page { +impl ::std::fmt::Display for Page { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Page { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -915,7 +605,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x0b2\x10.google.api.PageR\x08subpagesBt\n\x0ecom.google.apiB\x12Documen\ tationProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfi\ g;serviceconfig\xa2\x02\x04GAPIJ\xb85\n\x07\x12\x05\x0e\0\xa7\x01\x01\n\ - \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Go\ + \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\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\ @@ -941,7 +631,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20\x20\x20\x20content:\x20(==\x20include\x20google/foo/overview.md\ \x20==)\n\x20\x20\x20-\x20name:\x20Tutorial\n\x20\x20\x20\x20\x20con\ tent:\x20(==\x20include\x20google/foo/tutorial.md\x20==)\n\x20\ - \x20\x20\x20\x20subpages;\n\x20\x20\x20\x20\x20-\x20name:\x20Java\n\x20\ + \x20\x20\x20\x20subpages:\n\x20\x20\x20\x20\x20-\x20name:\x20Java\n\x20\ \x20\x20\x20\x20\x20\x20content:\x20(==\x20include\x20google/foo/tut\ orial_java.md\x20==)\n\x20\x20\x20rules:\n\x20\x20\x20-\x20selector:\ \x20google.calendar.Calendar.Get\n\x20\x20\x20\x20\x20description:\x20>\ @@ -1086,14 +776,33 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x05\x04\x02\x02\x02\x03\x12\x04\xa6\x01\x1b\x1cb\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(3); + messages.push(Documentation::generated_message_descriptor_data()); + messages.push(DocumentationRule::generated_message_descriptor_data()); + messages.push(Page::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/endpoint.rs b/googleapis-raw/src/api/endpoint.rs index 30a2420..c219b8d 100644 --- a/googleapis-raw/src/api/endpoint.rs +++ b/googleapis-raw/src/api/endpoint.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,31 +9,52 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/endpoint.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Endpoint) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Endpoint { // message fields + /// The canonical name of this endpoint. + // @@protoc_insertion_point(field:google.api.Endpoint.name) pub name: ::std::string::String, - pub aliases: ::protobuf::RepeatedField<::std::string::String>, + /// Aliases for this endpoint, these will be served by the same UrlMap as the + /// parent endpoint, and will be provisioned in the GCP stack for the Regional + /// Endpoints. + // @@protoc_insertion_point(field:google.api.Endpoint.aliases) + pub aliases: ::std::vec::Vec<::std::string::String>, + /// The specification of an Internet routable address of API frontend that will + /// handle requests to this [API + /// Endpoint](https://cloud.google.com/apis/design/glossary). It should be + /// either a valid IPv4 address or a fully-qualified domain name. For example, + /// "8.8.8.8" or "myservice.appspot.com". + // @@protoc_insertion_point(field:google.api.Endpoint.target) pub target: ::std::string::String, + /// Allowing + /// [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka + /// cross-domain traffic, would allow the backends served from this endpoint to + /// receive and respond to HTTP OPTIONS requests. The response will be used by + /// the browser to determine whether the subsequent cross-origin request is + /// allowed to proceed. + // @@protoc_insertion_point(field:google.api.Endpoint.allow_cors) pub allow_cors: bool, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Endpoint.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Endpoint { @@ -46,126 +68,61 @@ impl Endpoint { ::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()) - } - - // repeated string aliases = 2; - - - pub fn get_aliases(&self) -> &[::std::string::String] { - &self.aliases - } - pub fn clear_aliases(&mut self) { - self.aliases.clear(); - } - - // Param is passed by value, moved - pub fn set_aliases(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.aliases = v; - } - - // Mutable pointer to the field. - pub fn mut_aliases(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.aliases - } - - // Take field - pub fn take_aliases(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.aliases, ::protobuf::RepeatedField::new()) - } - - // string target = 101; - - - pub fn get_target(&self) -> &str { - &self.target - } - pub fn clear_target(&mut self) { - self.target.clear(); - } - - // Param is passed by value, moved - pub fn set_target(&mut self, v: ::std::string::String) { - self.target = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_target(&mut self) -> &mut ::std::string::String { - &mut self.target - } - - // Take field - pub fn take_target(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.target, ::std::string::String::new()) - } - - // bool allow_cors = 5; - - - pub fn get_allow_cors(&self) -> bool { - self.allow_cors - } - pub fn clear_allow_cors(&mut self) { - self.allow_cors = false; - } - - // Param is passed by value, moved - pub fn set_allow_cors(&mut self, v: bool) { - self.allow_cors = v; + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(4); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &Endpoint| { &m.name }, + |m: &mut Endpoint| { &mut m.name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "aliases", + |m: &Endpoint| { &m.aliases }, + |m: &mut Endpoint| { &mut m.aliases }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "target", + |m: &Endpoint| { &m.target }, + |m: &mut Endpoint| { &mut m.target }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "allow_cors", + |m: &Endpoint| { &m.allow_cors }, + |m: &mut Endpoint| { &mut m.allow_cors }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Endpoint", + fields, + oneofs, + ) } } impl ::protobuf::Message for Endpoint { + const NAME: &'static str = "Endpoint"; + 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)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.name = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.aliases)?; + 18 => { + self.aliases.push(is.read_string()?); }, - 101 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.target)?; + 810 => { + self.target = is.read_string()?; }, - 5 => { - 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.allow_cors = tmp; + 40 => { + self.allow_cors = is.read_bool()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -174,7 +131,7 @@ impl ::protobuf::Message for Endpoint { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.name); @@ -186,14 +143,14 @@ impl ::protobuf::Message for Endpoint { my_size += ::protobuf::rt::string_size(101, &self.target); } if self.allow_cors != false { - my_size += 2; + my_size += 1 + 1; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.name.is_empty() { os.write_string(1, &self.name)?; } @@ -206,189 +163,162 @@ impl ::protobuf::Message for Endpoint { if self.allow_cors != false { os.write_bool(5, self.allow_cors)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Endpoint { Endpoint::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Endpoint| { &m.name }, - |m: &mut Endpoint| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "aliases", - |m: &Endpoint| { &m.aliases }, - |m: &mut Endpoint| { &mut m.aliases }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "target", - |m: &Endpoint| { &m.target }, - |m: &mut Endpoint| { &mut m.target }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "allow_cors", - |m: &Endpoint| { &m.allow_cors }, - |m: &mut Endpoint| { &mut m.allow_cors }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Endpoint", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.name.clear(); + self.aliases.clear(); + self.target.clear(); + self.allow_cors = false; + self.special_fields.clear(); } fn default_instance() -> &'static Endpoint { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Endpoint::new) + static instance: Endpoint = Endpoint { + name: ::std::string::String::new(), + aliases: ::std::vec::Vec::new(), + target: ::std::string::String::new(), + allow_cors: false, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Endpoint { - fn clear(&mut self) { - self.name.clear(); - self.aliases.clear(); - self.target.clear(); - self.allow_cors = false; - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Endpoint { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Endpoint").unwrap()).clone() } } -impl ::std::fmt::Debug for Endpoint { +impl ::std::fmt::Display for Endpoint { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Endpoint { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x19google/api/endpoint.proto\x12\ngoogle.api\"s\n\x08Endpoint\x12\x12\ - \n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x1c\n\x07aliases\x18\x02\x20\ - \x03(\tR\x07aliasesB\x02\x18\x01\x12\x16\n\x06target\x18e\x20\x01(\tR\ - \x06target\x12\x1d\n\nallow_cors\x18\x05\x20\x01(\x08R\tallowCorsBo\n\ - \x0ecom.google.apiB\rEndpointProtoP\x01ZEgoogle.golang.org/genproto/goog\ - leapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIJ\xcd\x16\n\x06\ - \x12\x04\x0e\0H\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Co\ - pyright\x202023\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apac\ - he\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20ma\ - y\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\x20Unless\x20required\x20by\x20applicable\x20law\x20or\ - \x20agreed\x20to\x20in\x20writing,\x20software\n\x20distributed\x20under\ - \x20the\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20IS\"\x20B\ - ASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIN\ - D,\x20either\x20express\x20or\x20implied.\n\x20See\x20the\x20License\x20\ - for\x20the\x20specific\x20language\x20governing\x20permissions\x20and\n\ - \x20limitations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\ - \x10\0\x13\n\x08\n\x01\x08\x12\x03\x12\0\\\n\t\n\x02\x08\x0b\x12\x03\x12\ - \0\\\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\xd0\x07\n\x02\x04\0\ - \x12\x04-\0H\x01\x1a\xc3\x07\x20`Endpoint`\x20describes\x20a\x20network\ - \x20address\x20of\x20a\x20service\x20that\x20serves\x20a\x20set\x20of\n\ - \x20APIs.\x20It\x20is\x20commonly\x20known\x20as\x20a\x20service\x20endp\ - oint.\x20A\x20service\x20may\x20expose\n\x20any\x20number\x20of\x20servi\ - ce\x20endpoints,\x20and\x20all\x20service\x20endpoints\x20share\x20the\ - \x20same\n\x20service\x20definition,\x20such\x20as\x20quota\x20limits\ - \x20and\x20monitoring\x20metrics.\n\n\x20Example:\n\n\x20\x20\x20\x20\ - \x20type:\x20google.api.Service\n\x20\x20\x20\x20\x20name:\x20library-ex\ - ample.googleapis.com\n\x20\x20\x20\x20\x20endpoints:\n\x20\x20\x20\x20\ - \x20\x20\x20#\x20Declares\x20network\x20address\x20`https://library-exam\ - ple.googleapis.com`\n\x20\x20\x20\x20\x20\x20\x20#\x20for\x20service\x20\ - `library-example.googleapis.com`.\x20The\x20`https`\x20scheme\n\x20\x20\ - \x20\x20\x20\x20\x20#\x20is\x20implicit\x20for\x20all\x20service\x20endp\ - oints.\x20Other\x20schemes\x20may\x20be\n\x20\x20\x20\x20\x20\x20\x20#\ - \x20supported\x20in\x20the\x20future.\n\x20\x20\x20\x20\x20-\x20name:\ - \x20library-example.googleapis.com\n\x20\x20\x20\x20\x20\x20\x20allow_co\ - rs:\x20false\n\x20\x20\x20\x20\x20-\x20name:\x20content-staging-library-\ - example.googleapis.com\n\x20\x20\x20\x20\x20\x20\x20#\x20Allows\x20HTTP\ - \x20OPTIONS\x20calls\x20to\x20be\x20passed\x20to\x20the\x20API\x20fronte\ - nd,\x20for\x20it\n\x20\x20\x20\x20\x20\x20\x20#\x20to\x20decide\x20wheth\ - er\x20the\x20subsequent\x20cross-origin\x20request\x20is\x20allowed\n\ - \x20\x20\x20\x20\x20\x20\x20#\x20to\x20proceed.\n\x20\x20\x20\x20\x20\ - \x20\x20allow_cors:\x20true\n\n\n\n\x03\x04\0\x01\x12\x03-\x08\x10\n3\n\ - \x04\x04\0\x02\0\x12\x03/\x02\x12\x1a&\x20The\x20canonical\x20name\x20of\ - \x20this\x20endpoint.\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03/\x02\x08\n\ - \x0c\n\x05\x04\0\x02\0\x01\x12\x03/\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\ - \x03/\x10\x11\n\x96\x02\n\x04\x04\0\x02\x01\x12\x038\x022\x1a\x88\x02\ - \x20Unimplemented.\x20Dot\x20not\x20use.\n\n\x20DEPRECATED:\x20This\x20f\ - ield\x20is\x20no\x20longer\x20supported.\x20Instead\x20of\x20using\x20al\ - iases,\n\x20please\x20specify\x20multiple\x20[google.api.Endpoint][googl\ - e.api.Endpoint]\x20for\x20each\n\x20of\x20the\x20intended\x20aliases.\n\ - \n\x20Additional\x20names\x20that\x20this\x20endpoint\x20will\x20be\x20h\ - osted\x20on.\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x038\x02\n\n\x0c\n\x05\ - \x04\0\x02\x01\x05\x12\x038\x0b\x11\n\x0c\n\x05\x04\0\x02\x01\x01\x12\ - \x038\x12\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x038\x1c\x1d\n\x0c\n\x05\ - \x04\0\x02\x01\x08\x12\x038\x1e1\n\r\n\x06\x04\0\x02\x01\x08\x03\x12\x03\ - 8\x1f0\n\xb4\x02\n\x04\x04\0\x02\x02\x12\x03?\x02\x16\x1a\xa6\x02\x20The\ - \x20specification\x20of\x20an\x20Internet\x20routable\x20address\x20of\ - \x20API\x20frontend\x20that\x20will\n\x20handle\x20requests\x20to\x20thi\ - s\x20[API\n\x20Endpoint](https://cloud.google.com/apis/design/glossary).\ - \x20It\x20should\x20be\n\x20either\x20a\x20valid\x20IPv4\x20address\x20o\ - r\x20a\x20fully-qualified\x20domain\x20name.\x20For\x20example,\n\x20\"8\ - .8.8.8\"\x20or\x20\"myservice.appspot.com\".\n\n\x0c\n\x05\x04\0\x02\x02\ - \x05\x12\x03?\x02\x08\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03?\t\x0f\n\x0c\ - \n\x05\x04\0\x02\x02\x03\x12\x03?\x12\x15\n\xd9\x02\n\x04\x04\0\x02\x03\ - \x12\x03G\x02\x16\x1a\xcb\x02\x20Allowing\n\x20[CORS](https://en.wikiped\ - ia.org/wiki/Cross-origin_resource_sharing),\x20aka\n\x20cross-domain\x20\ - traffic,\x20would\x20allow\x20the\x20backends\x20served\x20from\x20this\ - \x20endpoint\x20to\n\x20receive\x20and\x20respond\x20to\x20HTTP\x20OPTIO\ - NS\x20requests.\x20The\x20response\x20will\x20be\x20used\x20by\n\x20the\ - \x20browser\x20to\x20determine\x20whether\x20the\x20subsequent\x20cross-\ - origin\x20request\x20is\n\x20allowed\x20to\x20proceed.\n\n\x0c\n\x05\x04\ - \0\x02\x03\x05\x12\x03G\x02\x06\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03G\ - \x07\x11\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03G\x14\x15b\x06proto3\ + \n\x19google/api/endpoint.proto\x12\ngoogle.api\"o\n\x08Endpoint\x12\x12\ + \n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x18\n\x07aliases\x18\x02\x20\ + \x03(\tR\x07aliases\x12\x16\n\x06target\x18e\x20\x01(\tR\x06target\x12\ + \x1d\n\nallow_cors\x18\x05\x20\x01(\x08R\tallowCorsBo\n\x0ecom.google.ap\ + iB\rEndpointProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/servic\ + econfig;serviceconfig\xa2\x02\x04GAPIJ\xcb\x15\n\x06\x12\x04\x0e\0D\x01\ + \n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20\ + Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20V\ + ersion\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20\ + this\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\x13\n\x08\n\x01\x08\ + \x12\x03\x12\0\\\n\t\n\x02\x08\x0b\x12\x03\x12\0\\\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\xd0\x07\n\x02\x04\0\x12\x04-\0D\x01\x1a\xc3\x07\ + \x20`Endpoint`\x20describes\x20a\x20network\x20address\x20of\x20a\x20ser\ + vice\x20that\x20serves\x20a\x20set\x20of\n\x20APIs.\x20It\x20is\x20commo\ + nly\x20known\x20as\x20a\x20service\x20endpoint.\x20A\x20service\x20may\ + \x20expose\n\x20any\x20number\x20of\x20service\x20endpoints,\x20and\x20a\ + ll\x20service\x20endpoints\x20share\x20the\x20same\n\x20service\x20defin\ + ition,\x20such\x20as\x20quota\x20limits\x20and\x20monitoring\x20metrics.\ + \n\n\x20Example:\n\n\x20\x20\x20\x20\x20type:\x20google.api.Service\n\ + \x20\x20\x20\x20\x20name:\x20library-example.googleapis.com\n\x20\x20\ + \x20\x20\x20endpoints:\n\x20\x20\x20\x20\x20\x20\x20#\x20Declares\x20net\ + work\x20address\x20`https://library-example.googleapis.com`\n\x20\x20\ + \x20\x20\x20\x20\x20#\x20for\x20service\x20`library-example.googleapis.c\ + om`.\x20The\x20`https`\x20scheme\n\x20\x20\x20\x20\x20\x20\x20#\x20is\ + \x20implicit\x20for\x20all\x20service\x20endpoints.\x20Other\x20schemes\ + \x20may\x20be\n\x20\x20\x20\x20\x20\x20\x20#\x20supported\x20in\x20the\ + \x20future.\n\x20\x20\x20\x20\x20-\x20name:\x20library-example.googleapi\ + s.com\n\x20\x20\x20\x20\x20\x20\x20allow_cors:\x20false\n\x20\x20\x20\ + \x20\x20-\x20name:\x20content-staging-library-example.googleapis.com\n\ + \x20\x20\x20\x20\x20\x20\x20#\x20Allows\x20HTTP\x20OPTIONS\x20calls\x20t\ + o\x20be\x20passed\x20to\x20the\x20API\x20frontend,\x20for\x20it\n\x20\ + \x20\x20\x20\x20\x20\x20#\x20to\x20decide\x20whether\x20the\x20subsequen\ + t\x20cross-origin\x20request\x20is\x20allowed\n\x20\x20\x20\x20\x20\x20\ + \x20#\x20to\x20proceed.\n\x20\x20\x20\x20\x20\x20\x20allow_cors:\x20true\ + \n\n\n\n\x03\x04\0\x01\x12\x03-\x08\x10\n3\n\x04\x04\0\x02\0\x12\x03/\ + \x02\x12\x1a&\x20The\x20canonical\x20name\x20of\x20this\x20endpoint.\n\n\ + \x0c\n\x05\x04\0\x02\0\x05\x12\x03/\x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\ + \x12\x03/\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03/\x10\x11\n\xb1\x01\n\ + \x04\x04\0\x02\x01\x12\x034\x02\x1e\x1a\xa3\x01\x20Aliases\x20for\x20thi\ + s\x20endpoint,\x20these\x20will\x20be\x20served\x20by\x20the\x20same\x20\ + UrlMap\x20as\x20the\n\x20parent\x20endpoint,\x20and\x20will\x20be\x20pro\ + visioned\x20in\x20the\x20GCP\x20stack\x20for\x20the\x20Regional\n\x20End\ + points.\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x034\x02\n\n\x0c\n\x05\x04\0\ + \x02\x01\x05\x12\x034\x0b\x11\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x034\x12\ + \x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x034\x1c\x1d\n\xb4\x02\n\x04\x04\ + \0\x02\x02\x12\x03;\x02\x16\x1a\xa6\x02\x20The\x20specification\x20of\ + \x20an\x20Internet\x20routable\x20address\x20of\x20API\x20frontend\x20th\ + at\x20will\n\x20handle\x20requests\x20to\x20this\x20[API\n\x20Endpoint](\ + https://cloud.google.com/apis/design/glossary).\x20It\x20should\x20be\n\ + \x20either\x20a\x20valid\x20IPv4\x20address\x20or\x20a\x20fully-qualifie\ + d\x20domain\x20name.\x20For\x20example,\n\x20\"8.8.8.8\"\x20or\x20\"myse\ + rvice.appspot.com\".\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03;\x02\x08\n\ + \x0c\n\x05\x04\0\x02\x02\x01\x12\x03;\t\x0f\n\x0c\n\x05\x04\0\x02\x02\ + \x03\x12\x03;\x12\x15\n\xd9\x02\n\x04\x04\0\x02\x03\x12\x03C\x02\x16\x1a\ + \xcb\x02\x20Allowing\n\x20[CORS](https://en.wikipedia.org/wiki/Cross-ori\ + gin_resource_sharing),\x20aka\n\x20cross-domain\x20traffic,\x20would\x20\ + allow\x20the\x20backends\x20served\x20from\x20this\x20endpoint\x20to\n\ + \x20receive\x20and\x20respond\x20to\x20HTTP\x20OPTIONS\x20requests.\x20T\ + he\x20response\x20will\x20be\x20used\x20by\n\x20the\x20browser\x20to\x20\ + determine\x20whether\x20the\x20subsequent\x20cross-origin\x20request\x20\ + is\n\x20allowed\x20to\x20proceed.\n\n\x0c\n\x05\x04\0\x02\x03\x05\x12\ + \x03C\x02\x06\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03C\x07\x11\n\x0c\n\x05\ + \x04\0\x02\x03\x03\x12\x03C\x14\x15b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(1); + messages.push(Endpoint::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/error_reason.rs b/googleapis-raw/src/api/error_reason.rs index 9fbc249..3e266f9 100644 --- a/googleapis-raw/src/api/error_reason.rs +++ b/googleapis-raw/src/api/error_reason.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,56 +9,106 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/error_reason.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +/// Defines the supported values for `google.rpc.ErrorInfo.reason` for the +/// `googleapis.com` error domain. This error domain is reserved for [Service +/// Infrastructure](https://cloud.google.com/service-infrastructure/docs/overview). +/// For each error info of this domain, the metadata key "service" refers to the +/// logical identifier of an API service, such as "pubsub.googleapis.com". The +/// "consumer" refers to the entity that consumes an API Service. It typically is +/// a Google project that owns the client application or the server resource, +/// such as "projects/123". Other metadata keys are specific to each error +/// reason. For more information, see the definition of the specific error +/// reason. +#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] +// @@protoc_insertion_point(enum:google.api.ErrorReason) pub enum ErrorReason { + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.ERROR_REASON_UNSPECIFIED) ERROR_REASON_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.SERVICE_DISABLED) SERVICE_DISABLED = 1, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.BILLING_DISABLED) BILLING_DISABLED = 2, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.API_KEY_INVALID) API_KEY_INVALID = 3, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.API_KEY_SERVICE_BLOCKED) API_KEY_SERVICE_BLOCKED = 4, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.API_KEY_HTTP_REFERRER_BLOCKED) API_KEY_HTTP_REFERRER_BLOCKED = 7, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.API_KEY_IP_ADDRESS_BLOCKED) API_KEY_IP_ADDRESS_BLOCKED = 8, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.API_KEY_ANDROID_APP_BLOCKED) API_KEY_ANDROID_APP_BLOCKED = 9, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.API_KEY_IOS_APP_BLOCKED) API_KEY_IOS_APP_BLOCKED = 13, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.RATE_LIMIT_EXCEEDED) RATE_LIMIT_EXCEEDED = 5, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.RESOURCE_QUOTA_EXCEEDED) RESOURCE_QUOTA_EXCEEDED = 6, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.LOCATION_TAX_POLICY_VIOLATED) LOCATION_TAX_POLICY_VIOLATED = 10, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.USER_PROJECT_DENIED) USER_PROJECT_DENIED = 11, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.CONSUMER_SUSPENDED) CONSUMER_SUSPENDED = 12, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.CONSUMER_INVALID) CONSUMER_INVALID = 14, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.SECURITY_POLICY_VIOLATED) SECURITY_POLICY_VIOLATED = 15, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.ACCESS_TOKEN_EXPIRED) ACCESS_TOKEN_EXPIRED = 16, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.ACCESS_TOKEN_SCOPE_INSUFFICIENT) ACCESS_TOKEN_SCOPE_INSUFFICIENT = 17, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.ACCOUNT_STATE_INVALID) ACCOUNT_STATE_INVALID = 18, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.ACCESS_TOKEN_TYPE_UNSUPPORTED) ACCESS_TOKEN_TYPE_UNSUPPORTED = 19, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.CREDENTIALS_MISSING) CREDENTIALS_MISSING = 20, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.RESOURCE_PROJECT_INVALID) RESOURCE_PROJECT_INVALID = 21, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.SESSION_COOKIE_INVALID) SESSION_COOKIE_INVALID = 23, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.USER_BLOCKED_BY_ADMIN) USER_BLOCKED_BY_ADMIN = 24, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.RESOURCE_USAGE_RESTRICTION_VIOLATED) RESOURCE_USAGE_RESTRICTION_VIOLATED = 25, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.SYSTEM_PARAMETER_UNSUPPORTED) SYSTEM_PARAMETER_UNSUPPORTED = 26, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.ORG_RESTRICTION_VIOLATION) ORG_RESTRICTION_VIOLATION = 27, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.ORG_RESTRICTION_HEADER_INVALID) ORG_RESTRICTION_HEADER_INVALID = 28, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.SERVICE_NOT_VISIBLE) SERVICE_NOT_VISIBLE = 29, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.GCP_SUSPENDED) GCP_SUSPENDED = 30, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.LOCATION_POLICY_VIOLATED) + LOCATION_POLICY_VIOLATED = 31, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.MISSING_ORIGIN) + MISSING_ORIGIN = 33, + // @@protoc_insertion_point(enum_value:google.api.ErrorReason.OVERLOADED_CREDENTIALS) + OVERLOADED_CREDENTIALS = 34, } -impl ::protobuf::ProtobufEnum for ErrorReason { +impl ::protobuf::Enum for ErrorReason { + const NAME: &'static str = "ErrorReason"; + fn value(&self) -> i32 { *self as i32 } @@ -94,55 +145,133 @@ impl ::protobuf::ProtobufEnum for ErrorReason { 28 => ::std::option::Option::Some(ErrorReason::ORG_RESTRICTION_HEADER_INVALID), 29 => ::std::option::Option::Some(ErrorReason::SERVICE_NOT_VISIBLE), 30 => ::std::option::Option::Some(ErrorReason::GCP_SUSPENDED), + 31 => ::std::option::Option::Some(ErrorReason::LOCATION_POLICY_VIOLATED), + 33 => ::std::option::Option::Some(ErrorReason::MISSING_ORIGIN), + 34 => ::std::option::Option::Some(ErrorReason::OVERLOADED_CREDENTIALS), _ => ::std::option::Option::None } } - fn values() -> &'static [Self] { - static values: &'static [ErrorReason] = &[ - ErrorReason::ERROR_REASON_UNSPECIFIED, - ErrorReason::SERVICE_DISABLED, - ErrorReason::BILLING_DISABLED, - ErrorReason::API_KEY_INVALID, - ErrorReason::API_KEY_SERVICE_BLOCKED, - ErrorReason::API_KEY_HTTP_REFERRER_BLOCKED, - ErrorReason::API_KEY_IP_ADDRESS_BLOCKED, - ErrorReason::API_KEY_ANDROID_APP_BLOCKED, - ErrorReason::API_KEY_IOS_APP_BLOCKED, - ErrorReason::RATE_LIMIT_EXCEEDED, - ErrorReason::RESOURCE_QUOTA_EXCEEDED, - ErrorReason::LOCATION_TAX_POLICY_VIOLATED, - ErrorReason::USER_PROJECT_DENIED, - ErrorReason::CONSUMER_SUSPENDED, - ErrorReason::CONSUMER_INVALID, - ErrorReason::SECURITY_POLICY_VIOLATED, - ErrorReason::ACCESS_TOKEN_EXPIRED, - ErrorReason::ACCESS_TOKEN_SCOPE_INSUFFICIENT, - ErrorReason::ACCOUNT_STATE_INVALID, - ErrorReason::ACCESS_TOKEN_TYPE_UNSUPPORTED, - ErrorReason::CREDENTIALS_MISSING, - ErrorReason::RESOURCE_PROJECT_INVALID, - ErrorReason::SESSION_COOKIE_INVALID, - ErrorReason::USER_BLOCKED_BY_ADMIN, - ErrorReason::RESOURCE_USAGE_RESTRICTION_VIOLATED, - ErrorReason::SYSTEM_PARAMETER_UNSUPPORTED, - ErrorReason::ORG_RESTRICTION_VIOLATION, - ErrorReason::ORG_RESTRICTION_HEADER_INVALID, - ErrorReason::SERVICE_NOT_VISIBLE, - ErrorReason::GCP_SUSPENDED, - ]; - values + fn from_str(str: &str) -> ::std::option::Option { + match str { + "ERROR_REASON_UNSPECIFIED" => ::std::option::Option::Some(ErrorReason::ERROR_REASON_UNSPECIFIED), + "SERVICE_DISABLED" => ::std::option::Option::Some(ErrorReason::SERVICE_DISABLED), + "BILLING_DISABLED" => ::std::option::Option::Some(ErrorReason::BILLING_DISABLED), + "API_KEY_INVALID" => ::std::option::Option::Some(ErrorReason::API_KEY_INVALID), + "API_KEY_SERVICE_BLOCKED" => ::std::option::Option::Some(ErrorReason::API_KEY_SERVICE_BLOCKED), + "API_KEY_HTTP_REFERRER_BLOCKED" => ::std::option::Option::Some(ErrorReason::API_KEY_HTTP_REFERRER_BLOCKED), + "API_KEY_IP_ADDRESS_BLOCKED" => ::std::option::Option::Some(ErrorReason::API_KEY_IP_ADDRESS_BLOCKED), + "API_KEY_ANDROID_APP_BLOCKED" => ::std::option::Option::Some(ErrorReason::API_KEY_ANDROID_APP_BLOCKED), + "API_KEY_IOS_APP_BLOCKED" => ::std::option::Option::Some(ErrorReason::API_KEY_IOS_APP_BLOCKED), + "RATE_LIMIT_EXCEEDED" => ::std::option::Option::Some(ErrorReason::RATE_LIMIT_EXCEEDED), + "RESOURCE_QUOTA_EXCEEDED" => ::std::option::Option::Some(ErrorReason::RESOURCE_QUOTA_EXCEEDED), + "LOCATION_TAX_POLICY_VIOLATED" => ::std::option::Option::Some(ErrorReason::LOCATION_TAX_POLICY_VIOLATED), + "USER_PROJECT_DENIED" => ::std::option::Option::Some(ErrorReason::USER_PROJECT_DENIED), + "CONSUMER_SUSPENDED" => ::std::option::Option::Some(ErrorReason::CONSUMER_SUSPENDED), + "CONSUMER_INVALID" => ::std::option::Option::Some(ErrorReason::CONSUMER_INVALID), + "SECURITY_POLICY_VIOLATED" => ::std::option::Option::Some(ErrorReason::SECURITY_POLICY_VIOLATED), + "ACCESS_TOKEN_EXPIRED" => ::std::option::Option::Some(ErrorReason::ACCESS_TOKEN_EXPIRED), + "ACCESS_TOKEN_SCOPE_INSUFFICIENT" => ::std::option::Option::Some(ErrorReason::ACCESS_TOKEN_SCOPE_INSUFFICIENT), + "ACCOUNT_STATE_INVALID" => ::std::option::Option::Some(ErrorReason::ACCOUNT_STATE_INVALID), + "ACCESS_TOKEN_TYPE_UNSUPPORTED" => ::std::option::Option::Some(ErrorReason::ACCESS_TOKEN_TYPE_UNSUPPORTED), + "CREDENTIALS_MISSING" => ::std::option::Option::Some(ErrorReason::CREDENTIALS_MISSING), + "RESOURCE_PROJECT_INVALID" => ::std::option::Option::Some(ErrorReason::RESOURCE_PROJECT_INVALID), + "SESSION_COOKIE_INVALID" => ::std::option::Option::Some(ErrorReason::SESSION_COOKIE_INVALID), + "USER_BLOCKED_BY_ADMIN" => ::std::option::Option::Some(ErrorReason::USER_BLOCKED_BY_ADMIN), + "RESOURCE_USAGE_RESTRICTION_VIOLATED" => ::std::option::Option::Some(ErrorReason::RESOURCE_USAGE_RESTRICTION_VIOLATED), + "SYSTEM_PARAMETER_UNSUPPORTED" => ::std::option::Option::Some(ErrorReason::SYSTEM_PARAMETER_UNSUPPORTED), + "ORG_RESTRICTION_VIOLATION" => ::std::option::Option::Some(ErrorReason::ORG_RESTRICTION_VIOLATION), + "ORG_RESTRICTION_HEADER_INVALID" => ::std::option::Option::Some(ErrorReason::ORG_RESTRICTION_HEADER_INVALID), + "SERVICE_NOT_VISIBLE" => ::std::option::Option::Some(ErrorReason::SERVICE_NOT_VISIBLE), + "GCP_SUSPENDED" => ::std::option::Option::Some(ErrorReason::GCP_SUSPENDED), + "LOCATION_POLICY_VIOLATED" => ::std::option::Option::Some(ErrorReason::LOCATION_POLICY_VIOLATED), + "MISSING_ORIGIN" => ::std::option::Option::Some(ErrorReason::MISSING_ORIGIN), + "OVERLOADED_CREDENTIALS" => ::std::option::Option::Some(ErrorReason::OVERLOADED_CREDENTIALS), + _ => ::std::option::Option::None + } } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ErrorReason", file_descriptor_proto()) - }) - } + const VALUES: &'static [ErrorReason] = &[ + ErrorReason::ERROR_REASON_UNSPECIFIED, + ErrorReason::SERVICE_DISABLED, + ErrorReason::BILLING_DISABLED, + ErrorReason::API_KEY_INVALID, + ErrorReason::API_KEY_SERVICE_BLOCKED, + ErrorReason::API_KEY_HTTP_REFERRER_BLOCKED, + ErrorReason::API_KEY_IP_ADDRESS_BLOCKED, + ErrorReason::API_KEY_ANDROID_APP_BLOCKED, + ErrorReason::API_KEY_IOS_APP_BLOCKED, + ErrorReason::RATE_LIMIT_EXCEEDED, + ErrorReason::RESOURCE_QUOTA_EXCEEDED, + ErrorReason::LOCATION_TAX_POLICY_VIOLATED, + ErrorReason::USER_PROJECT_DENIED, + ErrorReason::CONSUMER_SUSPENDED, + ErrorReason::CONSUMER_INVALID, + ErrorReason::SECURITY_POLICY_VIOLATED, + ErrorReason::ACCESS_TOKEN_EXPIRED, + ErrorReason::ACCESS_TOKEN_SCOPE_INSUFFICIENT, + ErrorReason::ACCOUNT_STATE_INVALID, + ErrorReason::ACCESS_TOKEN_TYPE_UNSUPPORTED, + ErrorReason::CREDENTIALS_MISSING, + ErrorReason::RESOURCE_PROJECT_INVALID, + ErrorReason::SESSION_COOKIE_INVALID, + ErrorReason::USER_BLOCKED_BY_ADMIN, + ErrorReason::RESOURCE_USAGE_RESTRICTION_VIOLATED, + ErrorReason::SYSTEM_PARAMETER_UNSUPPORTED, + ErrorReason::ORG_RESTRICTION_VIOLATION, + ErrorReason::ORG_RESTRICTION_HEADER_INVALID, + ErrorReason::SERVICE_NOT_VISIBLE, + ErrorReason::GCP_SUSPENDED, + ErrorReason::LOCATION_POLICY_VIOLATED, + ErrorReason::MISSING_ORIGIN, + ErrorReason::OVERLOADED_CREDENTIALS, + ]; } -impl ::std::marker::Copy for ErrorReason { +impl ::protobuf::EnumFull for ErrorReason { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().enum_by_package_relative_name("ErrorReason").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = match self { + ErrorReason::ERROR_REASON_UNSPECIFIED => 0, + ErrorReason::SERVICE_DISABLED => 1, + ErrorReason::BILLING_DISABLED => 2, + ErrorReason::API_KEY_INVALID => 3, + ErrorReason::API_KEY_SERVICE_BLOCKED => 4, + ErrorReason::API_KEY_HTTP_REFERRER_BLOCKED => 5, + ErrorReason::API_KEY_IP_ADDRESS_BLOCKED => 6, + ErrorReason::API_KEY_ANDROID_APP_BLOCKED => 7, + ErrorReason::API_KEY_IOS_APP_BLOCKED => 8, + ErrorReason::RATE_LIMIT_EXCEEDED => 9, + ErrorReason::RESOURCE_QUOTA_EXCEEDED => 10, + ErrorReason::LOCATION_TAX_POLICY_VIOLATED => 11, + ErrorReason::USER_PROJECT_DENIED => 12, + ErrorReason::CONSUMER_SUSPENDED => 13, + ErrorReason::CONSUMER_INVALID => 14, + ErrorReason::SECURITY_POLICY_VIOLATED => 15, + ErrorReason::ACCESS_TOKEN_EXPIRED => 16, + ErrorReason::ACCESS_TOKEN_SCOPE_INSUFFICIENT => 17, + ErrorReason::ACCOUNT_STATE_INVALID => 18, + ErrorReason::ACCESS_TOKEN_TYPE_UNSUPPORTED => 19, + ErrorReason::CREDENTIALS_MISSING => 20, + ErrorReason::RESOURCE_PROJECT_INVALID => 21, + ErrorReason::SESSION_COOKIE_INVALID => 22, + ErrorReason::USER_BLOCKED_BY_ADMIN => 23, + ErrorReason::RESOURCE_USAGE_RESTRICTION_VIOLATED => 24, + ErrorReason::SYSTEM_PARAMETER_UNSUPPORTED => 25, + ErrorReason::ORG_RESTRICTION_VIOLATION => 26, + ErrorReason::ORG_RESTRICTION_HEADER_INVALID => 27, + ErrorReason::SERVICE_NOT_VISIBLE => 28, + ErrorReason::GCP_SUSPENDED => 29, + ErrorReason::LOCATION_POLICY_VIOLATED => 30, + ErrorReason::MISSING_ORIGIN => 31, + ErrorReason::OVERLOADED_CREDENTIALS => 32, + }; + Self::enum_descriptor().value_by_index(index) + } } impl ::std::default::Default for ErrorReason { @@ -151,14 +280,14 @@ impl ::std::default::Default for ErrorReason { } } -impl ::protobuf::reflect::ProtobufValue for ErrorReason { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) +impl ErrorReason { + fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ErrorReason") } } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x1dgoogle/api/error_reason.proto\x12\ngoogle.api*\xec\x06\n\x0bErrorR\ + \n\x1dgoogle/api/error_reason.proto\x12\ngoogle.api*\xba\x07\n\x0bErrorR\ eason\x12\x1c\n\x18ERROR_REASON_UNSPECIFIED\x10\0\x12\x14\n\x10SERVICE_D\ ISABLED\x10\x01\x12\x14\n\x10BILLING_DISABLED\x10\x02\x12\x13\n\x0fAPI_K\ EY_INVALID\x10\x03\x12\x1b\n\x17API_KEY_SERVICE_BLOCKED\x10\x04\x12!\n\ @@ -177,94 +306,96 @@ static file_descriptor_proto_data: &'static [u8] = b"\ E_RESTRICTION_VIOLATED\x10\x19\x12\x20\n\x1cSYSTEM_PARAMETER_UNSUPPORTED\ \x10\x1a\x12\x1d\n\x19ORG_RESTRICTION_VIOLATION\x10\x1b\x12\"\n\x1eORG_R\ ESTRICTION_HEADER_INVALID\x10\x1c\x12\x17\n\x13SERVICE_NOT_VISIBLE\x10\ - \x1d\x12\x11\n\rGCP_SUSPENDED\x10\x1eBp\n\x0ecom.google.apiB\x10ErrorRea\ - sonProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/error_reason;er\ - ror_reason\xa2\x02\x04GAPIJ\xc0\x9e\x01\n\x07\x12\x05\x0e\0\xb9\x04\x01\ - \n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20\ - Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20V\ - ersion\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20\ - this\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\x13\n\x08\n\x01\x08\ - \x12\x03\x12\0Z\n\t\n\x02\x08\x0b\x12\x03\x12\0Z\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\01\ - \n\t\n\x02\x08\x08\x12\x03\x14\01\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\xbf\x05\n\x02\x05\0\x12\x05\"\0\xb9\x04\x01\x1a\ - \xb1\x05\x20Defines\x20the\x20supported\x20values\x20for\x20`google.rpc.\ - ErrorInfo.reason`\x20for\x20the\n\x20`googleapis.com`\x20error\x20domain\ - .\x20This\x20error\x20domain\x20is\x20reserved\x20for\x20[Service\n\x20I\ - nfrastructure](https://cloud.google.com/service-infrastructure/docs/over\ - view).\n\x20For\x20each\x20error\x20info\x20of\x20this\x20domain,\x20the\ - \x20metadata\x20key\x20\"service\"\x20refers\x20to\x20the\n\x20logical\ - \x20identifier\x20of\x20an\x20API\x20service,\x20such\x20as\x20\"pubsub.\ - googleapis.com\".\x20The\n\x20\"consumer\"\x20refers\x20to\x20the\x20ent\ - ity\x20that\x20consumes\x20an\x20API\x20Service.\x20It\x20typically\x20i\ - s\n\x20a\x20Google\x20project\x20that\x20owns\x20the\x20client\x20applic\ - ation\x20or\x20the\x20server\x20resource,\n\x20such\x20as\x20\"projects/\ - 123\".\x20Other\x20metadata\x20keys\x20are\x20specific\x20to\x20each\x20\ - error\n\x20reason.\x20For\x20more\x20information,\x20see\x20the\x20defin\ - ition\x20of\x20the\x20specific\x20error\n\x20reason.\n\n\n\n\x03\x05\0\ - \x01\x12\x03\"\x05\x10\n-\n\x04\x05\0\x02\0\x12\x03$\x02\x1f\x1a\x20\x20\ - Do\x20not\x20use\x20this\x20default\x20value.\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\n\xde\ - \x03\n\x04\x05\0\x02\x01\x12\x035\x02\x17\x1a\xd0\x03\x20The\x20request\ - \x20is\x20calling\x20a\x20disabled\x20service\x20for\x20a\x20consumer.\n\ - \n\x20Example\x20of\x20an\x20ErrorInfo\x20when\x20the\x20consumer\x20\"p\ - rojects/123\"\x20contacting\n\x20\"pubsub.googleapis.com\"\x20service\ - \x20which\x20is\x20disabled:\n\n\x20\x20\x20\x20\x20{\x20\"reason\":\x20\ - \"SERVICE_DISABLED\",\n\x20\x20\x20\x20\x20\x20\x20\"domain\":\x20\"goog\ - leapis.com\",\n\x20\x20\x20\x20\x20\x20\x20\"metadata\":\x20{\n\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20\"consumer\":\x20\"projects/123\",\n\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20\"service\":\x20\"pubsub.googleapis.com\"\n\ - \x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\n\x20This\x20resp\ - onse\x20indicates\x20the\x20\"pubsub.googleapis.com\"\x20has\x20been\x20\ - disabled\x20in\n\x20\"projects/123\".\n\n\x0c\n\x05\x05\0\x02\x01\x01\ - \x12\x035\x02\x12\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x035\x15\x16\n\xf6\ - \x03\n\x04\x05\0\x02\x02\x12\x03F\x02\x17\x1a\xe8\x03\x20The\x20request\ - \x20whose\x20associated\x20billing\x20account\x20is\x20disabled.\n\n\x20\ - Example\x20of\x20an\x20ErrorInfo\x20when\x20the\x20consumer\x20\"project\ - s/123\"\x20fails\x20to\x20contact\n\x20\"pubsub.googleapis.com\"\x20serv\ - ice\x20because\x20the\x20associated\x20billing\x20account\x20is\n\x20dis\ - abled:\n\n\x20\x20\x20\x20\x20{\x20\"reason\":\x20\"BILLING_DISABLED\",\ + \x1d\x12\x11\n\rGCP_SUSPENDED\x10\x1e\x12\x1c\n\x18LOCATION_POLICY_VIOLA\ + TED\x10\x1f\x12\x12\n\x0eMISSING_ORIGIN\x10!\x12\x1a\n\x16OVERLOADED_CRE\ + DENTIALS\x10\"Bp\n\x0ecom.google.apiB\x10ErrorReasonProtoP\x01ZCgoogle.g\ + olang.org/genproto/googleapis/api/error_reason;error_reason\xa2\x02\x04G\ + APIJ\xdc\xaa\x01\n\x07\x12\x05\x0e\0\xed\x04\x01\n\xbc\x04\n\x01\x0c\x12\ + \x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20Google\x20LLC\n\n\x20Lic\ + ensed\x20under\x20the\x20Apache\x20License,\x20Version\x202.0\x20(the\ + \x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\x20file\x20excep\ + t\x20in\x20compliance\x20with\x20the\x20License.\n\x20You\x20may\x20obta\ + in\x20a\x20copy\x20of\x20the\x20License\x20at\n\n\x20\x20\x20\x20\x20htt\ + p://www.apache.org/licenses/LICENSE-2.0\n\n\x20Unless\x20required\x20by\ + \x20applicable\x20law\x20or\x20agreed\x20to\x20in\x20writing,\x20softwar\ + e\n\x20distributed\x20under\x20the\x20License\x20is\x20distributed\x20on\ + \x20an\x20\"AS\x20IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CON\ + DITIONS\x20OF\x20ANY\x20KIND,\x20either\x20express\x20or\x20implied.\n\ + \x20See\x20the\x20License\x20for\x20the\x20specific\x20language\x20gover\ + ning\x20permissions\x20and\n\x20limitations\x20under\x20the\x20License.\ + \n\n\x08\n\x01\x02\x12\x03\x10\0\x13\n\x08\n\x01\x08\x12\x03\x12\0Z\n\t\ + \n\x02\x08\x0b\x12\x03\x12\0Z\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\01\n\t\n\x02\x08\x08\ + \x12\x03\x14\01\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\ + \xbf\x05\n\x02\x05\0\x12\x05\"\0\xed\x04\x01\x1a\xb1\x05\x20Defines\x20t\ + he\x20supported\x20values\x20for\x20`google.rpc.ErrorInfo.reason`\x20for\ + \x20the\n\x20`googleapis.com`\x20error\x20domain.\x20This\x20error\x20do\ + main\x20is\x20reserved\x20for\x20[Service\n\x20Infrastructure](https://c\ + loud.google.com/service-infrastructure/docs/overview).\n\x20For\x20each\ + \x20error\x20info\x20of\x20this\x20domain,\x20the\x20metadata\x20key\x20\ + \"service\"\x20refers\x20to\x20the\n\x20logical\x20identifier\x20of\x20a\ + n\x20API\x20service,\x20such\x20as\x20\"pubsub.googleapis.com\".\x20The\ + \n\x20\"consumer\"\x20refers\x20to\x20the\x20entity\x20that\x20consumes\ + \x20an\x20API\x20Service.\x20It\x20typically\x20is\n\x20a\x20Google\x20p\ + roject\x20that\x20owns\x20the\x20client\x20application\x20or\x20the\x20s\ + erver\x20resource,\n\x20such\x20as\x20\"projects/123\".\x20Other\x20meta\ + data\x20keys\x20are\x20specific\x20to\x20each\x20error\n\x20reason.\x20F\ + or\x20more\x20information,\x20see\x20the\x20definition\x20of\x20the\x20s\ + pecific\x20error\n\x20reason.\n\n\n\n\x03\x05\0\x01\x12\x03\"\x05\x10\n-\ + \n\x04\x05\0\x02\0\x12\x03$\x02\x1f\x1a\x20\x20Do\x20not\x20use\x20this\ + \x20default\x20value.\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\n\xde\x03\n\x04\x05\0\x02\ + \x01\x12\x035\x02\x17\x1a\xd0\x03\x20The\x20request\x20is\x20calling\x20\ + a\x20disabled\x20service\x20for\x20a\x20consumer.\n\n\x20Example\x20of\ + \x20an\x20ErrorInfo\x20when\x20the\x20consumer\x20\"projects/123\"\x20co\ + ntacting\n\x20\"pubsub.googleapis.com\"\x20service\x20which\x20is\x20dis\ + abled:\n\n\x20\x20\x20\x20\x20{\x20\"reason\":\x20\"SERVICE_DISABLED\",\ \n\x20\x20\x20\x20\x20\x20\x20\"domain\":\x20\"googleapis.com\",\n\x20\ \x20\x20\x20\x20\x20\x20\"metadata\":\x20{\n\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\"consumer\":\x20\"projects/123\",\n\x20\x20\x20\x20\x20\x20\x20\ \x20\x20\"service\":\x20\"pubsub.googleapis.com\"\n\x20\x20\x20\x20\x20\ \x20\x20}\n\x20\x20\x20\x20\x20}\n\n\x20This\x20response\x20indicates\ - \x20the\x20billing\x20account\x20associated\x20has\x20been\x20disabled.\ - \n\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03F\x02\x12\n\x0c\n\x05\x05\0\x02\ - \x02\x02\x12\x03F\x15\x16\n\xda\x03\n\x04\x05\0\x02\x03\x12\x03U\x02\x16\ - \x1a\xcc\x03\x20The\x20request\x20is\x20denied\x20because\x20the\x20prov\ - ided\x20[API\n\x20key](https://cloud.google.com/docs/authentication/api-\ - keys)\x20is\x20invalid.\x20It\n\x20may\x20be\x20in\x20a\x20bad\x20format\ - ,\x20cannot\x20be\x20found,\x20or\x20has\x20been\x20expired).\n\n\x20Exa\ - mple\x20of\x20an\x20ErrorInfo\x20when\x20the\x20request\x20is\x20contact\ - ing\n\x20\"storage.googleapis.com\"\x20service\x20with\x20an\x20invalid\ - \x20API\x20key:\n\n\x20\x20\x20\x20\x20{\x20\"reason\":\x20\"API_KEY_INV\ - ALID\",\n\x20\x20\x20\x20\x20\x20\x20\"domain\":\x20\"googleapis.com\",\ - \n\x20\x20\x20\x20\x20\x20\x20\"metadata\":\x20{\n\x20\x20\x20\x20\x20\ - \x20\x20\x20\x20\"service\":\x20\"storage.googleapis.com\",\n\x20\x20\ - \x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\n\x0c\n\x05\x05\0\x02\x03\ - \x01\x12\x03U\x02\x11\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03U\x14\x15\n\ - \x8f\x04\n\x04\x05\0\x02\x04\x12\x03e\x02\x1e\x1a\x81\x04\x20The\x20requ\ - est\x20is\x20denied\x20because\x20it\x20violates\x20[API\x20key\x20API\n\ - \x20restrictions](https://cloud.google.com/docs/authentication/api-keys#\ - adding_api_restrictions).\n\n\x20Example\x20of\x20an\x20ErrorInfo\x20whe\ - n\x20the\x20consumer\x20\"projects/123\"\x20fails\x20to\x20call\x20the\n\ - \x20\"storage.googleapis.com\"\x20service\x20because\x20this\x20service\ - \x20is\x20restricted\x20in\x20the\n\x20API\x20key:\n\n\x20\x20\x20\x20\ - \x20{\x20\"reason\":\x20\"API_KEY_SERVICE_BLOCKED\",\n\x20\x20\x20\x20\ - \x20\x20\x20\"domain\":\x20\"googleapis.com\",\n\x20\x20\x20\x20\x20\x20\ - \x20\"metadata\":\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\"consumer\"\ - :\x20\"projects/123\",\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\"service\":\ + \x20the\x20\"pubsub.googleapis.com\"\x20has\x20been\x20disabled\x20in\n\ + \x20\"projects/123\".\n\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x035\x02\x12\n\ + \x0c\n\x05\x05\0\x02\x01\x02\x12\x035\x15\x16\n\xf6\x03\n\x04\x05\0\x02\ + \x02\x12\x03F\x02\x17\x1a\xe8\x03\x20The\x20request\x20whose\x20associat\ + ed\x20billing\x20account\x20is\x20disabled.\n\n\x20Example\x20of\x20an\ + \x20ErrorInfo\x20when\x20the\x20consumer\x20\"projects/123\"\x20fails\ + \x20to\x20contact\n\x20\"pubsub.googleapis.com\"\x20service\x20because\ + \x20the\x20associated\x20billing\x20account\x20is\n\x20disabled:\n\n\x20\ + \x20\x20\x20\x20{\x20\"reason\":\x20\"BILLING_DISABLED\",\n\x20\x20\x20\ + \x20\x20\x20\x20\"domain\":\x20\"googleapis.com\",\n\x20\x20\x20\x20\x20\ + \x20\x20\"metadata\":\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\"consum\ + er\":\x20\"projects/123\",\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\"servic\ + e\":\x20\"pubsub.googleapis.com\"\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\ + \x20\x20\x20\x20}\n\n\x20This\x20response\x20indicates\x20the\x20billing\ + \x20account\x20associated\x20has\x20been\x20disabled.\n\n\x0c\n\x05\x05\ + \0\x02\x02\x01\x12\x03F\x02\x12\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03F\ + \x15\x16\n\xda\x03\n\x04\x05\0\x02\x03\x12\x03U\x02\x16\x1a\xcc\x03\x20T\ + he\x20request\x20is\x20denied\x20because\x20the\x20provided\x20[API\n\ + \x20key](https://cloud.google.com/docs/authentication/api-keys)\x20is\ + \x20invalid.\x20It\n\x20may\x20be\x20in\x20a\x20bad\x20format,\x20cannot\ + \x20be\x20found,\x20or\x20has\x20been\x20expired).\n\n\x20Example\x20of\ + \x20an\x20ErrorInfo\x20when\x20the\x20request\x20is\x20contacting\n\x20\ + \"storage.googleapis.com\"\x20service\x20with\x20an\x20invalid\x20API\ + \x20key:\n\n\x20\x20\x20\x20\x20{\x20\"reason\":\x20\"API_KEY_INVALID\",\ + \n\x20\x20\x20\x20\x20\x20\x20\"domain\":\x20\"googleapis.com\",\n\x20\ + \x20\x20\x20\x20\x20\x20\"metadata\":\x20{\n\x20\x20\x20\x20\x20\x20\x20\ + \x20\x20\"service\":\x20\"storage.googleapis.com\",\n\x20\x20\x20\x20\ + \x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\n\x0c\n\x05\x05\0\x02\x03\x01\x12\ + \x03U\x02\x11\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03U\x14\x15\n\x8f\x04\n\ + \x04\x05\0\x02\x04\x12\x03e\x02\x1e\x1a\x81\x04\x20The\x20request\x20is\ + \x20denied\x20because\x20it\x20violates\x20[API\x20key\x20API\n\x20restr\ + ictions](https://cloud.google.com/docs/authentication/api-keys#adding_ap\ + i_restrictions).\n\n\x20Example\x20of\x20an\x20ErrorInfo\x20when\x20the\ + \x20consumer\x20\"projects/123\"\x20fails\x20to\x20call\x20the\n\x20\"st\ + orage.googleapis.com\"\x20service\x20because\x20this\x20service\x20is\ + \x20restricted\x20in\x20the\n\x20API\x20key:\n\n\x20\x20\x20\x20\x20{\ + \x20\"reason\":\x20\"API_KEY_SERVICE_BLOCKED\",\n\x20\x20\x20\x20\x20\ + \x20\x20\"domain\":\x20\"googleapis.com\",\n\x20\x20\x20\x20\x20\x20\x20\ + \"metadata\":\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\"consumer\":\ + \x20\"projects/123\",\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\"service\":\ \x20\"storage.googleapis.com\"\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\ \x20\x20\x20}\n\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03e\x02\x19\n\x0c\n\ \x05\x05\0\x02\x04\x02\x12\x03e\x1c\x1d\n\xae\x04\n\x04\x05\0\x02\x05\ @@ -673,17 +804,72 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \n\x20\x20\x20\x20\x20}\n\n\x20This\x20response\x20indicates\x20the\x20a\ ssociated\x20GCP\x20account\x20has\x20been\x20suspended.\n\n\r\n\x05\x05\ \0\x02\x1d\x01\x12\x04\xb8\x04\x02\x0f\n\r\n\x05\x05\0\x02\x1d\x02\x12\ - \x04\xb8\x04\x12\x14b\x06proto3\ + \x04\xb8\x04\x12\x14\n\xef\x04\n\x04\x05\0\x02\x1e\x12\x04\xcb\x04\x02\ + \x20\x1a\xe0\x04\x20The\x20request\x20violates\x20the\x20location\x20pol\ + icies\x20when\x20creating\x20resources\x20in\n\x20the\x20restricted\x20r\ + egion.\n\n\x20Example\x20of\x20an\x20ErrorInfo\x20when\x20creating\x20th\ + e\x20Cloud\x20Storage\x20Bucket\x20by\n\x20\"projects/123\"\x20for\x20se\ + rvice\x20storage.googleapis.com:\n\n\x20\x20\x20\x20\x20{\x20\"reason\":\ + \x20\"LOCATION_POLICY_VIOLATED\",\n\x20\x20\x20\x20\x20\x20\x20\"domain\ + \":\x20\"googleapis.com\",\n\x20\x20\x20\x20\x20\x20\x20\"metadata\":\ + \x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\"consumer\":\x20\"projects/1\ + 23\",\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\"service\":\x20\"storage.goo\ + gleapis.com\",\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\n\ + \x20This\x20response\x20indicates\x20creating\x20the\x20Cloud\x20Storage\ + \x20Bucket\x20in\n\x20\"locations/asia-northeast3\"\x20violates\x20at\ + \x20least\x20one\x20location\x20policy.\n\x20The\x20troubleshooting\x20g\ + uidance\x20is\x20provided\x20in\x20the\x20Help\x20links.\n\n\r\n\x05\x05\ + \0\x02\x1e\x01\x12\x04\xcb\x04\x02\x1a\n\r\n\x05\x05\0\x02\x1e\x02\x12\ + \x04\xcb\x04\x1d\x1f\n\xde\x02\n\x04\x05\0\x02\x1f\x12\x04\xdb\x04\x02\ + \x16\x1a\xcf\x02\x20The\x20request\x20is\x20denied\x20because\x20origin\ + \x20request\x20header\x20is\x20missing.\n\n\x20Example\x20of\x20an\x20Er\ + rorInfo\x20when\n\x20accessing\x20\"pubsub.googleapis.com\"\x20service\ + \x20with\x20an\x20empty\x20\"Origin\"\x20request\n\x20header.\n\n\x20{\n\ + \x20\x20\x20reason:\x20\"MISSING_ORIGIN\"\n\x20\x20\x20domain:\x20\"goog\ + leapis.com\"\n\x20\x20\x20metadata\x20{\n\x20\x20\x20\x20\x20\"consumer\ + \":\"projects/123456\"\n\x20\x20\x20\x20\x20\"service\":\x20\"pubsub.goo\ + gleapis.com\"\n\x20\x20\x20}\n\x20}\n\n\r\n\x05\x05\0\x02\x1f\x01\x12\ + \x04\xdb\x04\x02\x10\n\r\n\x05\x05\0\x02\x1f\x02\x12\x04\xdb\x04\x13\x15\ + \n\xec\x03\n\x04\x05\0\x02\x20\x12\x04\xec\x04\x02\x1e\x1a\xdd\x03\x20Th\ + e\x20request\x20is\x20denied\x20because\x20the\x20request\x20contains\ + \x20more\x20than\x20one\x20credential\n\x20type\x20that\x20are\x20indivi\ + dually\x20acceptable,\x20but\x20not\x20together.\x20The\x20customer\n\ + \x20should\x20retry\x20their\x20request\x20with\x20only\x20one\x20set\ + \x20of\x20credentials.\n\n\x20Example\x20of\x20an\x20ErrorInfo\x20when\n\ + \x20accessing\x20\"pubsub.googleapis.com\"\x20service\x20with\x20overloa\ + ded\x20credentials.\n\n\x20{\n\x20\x20\x20reason:\x20\"OVERLOADED_CREDEN\ + TIALS\"\n\x20\x20\x20domain:\x20\"googleapis.com\"\n\x20\x20\x20metadata\ + \x20{\n\x20\x20\x20\x20\x20\"consumer\":\"projects/123456\"\n\x20\x20\ + \x20\x20\x20\"service\":\x20\"pubsub.googleapis.com\"\n\x20\x20\x20}\n\ + \x20}\n\n\r\n\x05\x05\0\x02\x20\x01\x12\x04\xec\x04\x02\x18\n\r\n\x05\ + \x05\0\x02\x20\x02\x12\x04\xec\x04\x1b\x1db\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(0); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(ErrorReason::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/field_behavior.rs b/googleapis-raw/src/api/field_behavior.rs index 5db31c4..6c53943 100644 --- a/googleapis-raw/src/api/field_behavior.rs +++ b/googleapis-raw/src/api/field_behavior.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,35 +9,54 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/field_behavior.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +/// An indicator of the behavior of a given field (for example, that a field +/// is required in requests, or given as output but ignored as input). +/// This **does not** change the behavior in protocol buffers itself; it only +/// denotes the behavior and may affect how API tooling handles the field. +/// +/// Note: This enum **may** receive new values in the future. +#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] +// @@protoc_insertion_point(enum:google.api.FieldBehavior) pub enum FieldBehavior { + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.FIELD_BEHAVIOR_UNSPECIFIED) FIELD_BEHAVIOR_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.OPTIONAL) OPTIONAL = 1, + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.REQUIRED) REQUIRED = 2, + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.OUTPUT_ONLY) OUTPUT_ONLY = 3, + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.INPUT_ONLY) INPUT_ONLY = 4, + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.IMMUTABLE) IMMUTABLE = 5, + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.UNORDERED_LIST) UNORDERED_LIST = 6, + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.NON_EMPTY_DEFAULT) NON_EMPTY_DEFAULT = 7, + // @@protoc_insertion_point(enum_value:google.api.FieldBehavior.IDENTIFIER) IDENTIFIER = 8, } -impl ::protobuf::ProtobufEnum for FieldBehavior { +impl ::protobuf::Enum for FieldBehavior { + const NAME: &'static str = "FieldBehavior"; + fn value(&self) -> i32 { *self as i32 } @@ -56,30 +76,44 @@ impl ::protobuf::ProtobufEnum for FieldBehavior { } } - fn values() -> &'static [Self] { - static values: &'static [FieldBehavior] = &[ - FieldBehavior::FIELD_BEHAVIOR_UNSPECIFIED, - FieldBehavior::OPTIONAL, - FieldBehavior::REQUIRED, - FieldBehavior::OUTPUT_ONLY, - FieldBehavior::INPUT_ONLY, - FieldBehavior::IMMUTABLE, - FieldBehavior::UNORDERED_LIST, - FieldBehavior::NON_EMPTY_DEFAULT, - FieldBehavior::IDENTIFIER, - ]; - values + fn from_str(str: &str) -> ::std::option::Option { + match str { + "FIELD_BEHAVIOR_UNSPECIFIED" => ::std::option::Option::Some(FieldBehavior::FIELD_BEHAVIOR_UNSPECIFIED), + "OPTIONAL" => ::std::option::Option::Some(FieldBehavior::OPTIONAL), + "REQUIRED" => ::std::option::Option::Some(FieldBehavior::REQUIRED), + "OUTPUT_ONLY" => ::std::option::Option::Some(FieldBehavior::OUTPUT_ONLY), + "INPUT_ONLY" => ::std::option::Option::Some(FieldBehavior::INPUT_ONLY), + "IMMUTABLE" => ::std::option::Option::Some(FieldBehavior::IMMUTABLE), + "UNORDERED_LIST" => ::std::option::Option::Some(FieldBehavior::UNORDERED_LIST), + "NON_EMPTY_DEFAULT" => ::std::option::Option::Some(FieldBehavior::NON_EMPTY_DEFAULT), + "IDENTIFIER" => ::std::option::Option::Some(FieldBehavior::IDENTIFIER), + _ => ::std::option::Option::None + } } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("FieldBehavior", file_descriptor_proto()) - }) - } + const VALUES: &'static [FieldBehavior] = &[ + FieldBehavior::FIELD_BEHAVIOR_UNSPECIFIED, + FieldBehavior::OPTIONAL, + FieldBehavior::REQUIRED, + FieldBehavior::OUTPUT_ONLY, + FieldBehavior::INPUT_ONLY, + FieldBehavior::IMMUTABLE, + FieldBehavior::UNORDERED_LIST, + FieldBehavior::NON_EMPTY_DEFAULT, + FieldBehavior::IDENTIFIER, + ]; } -impl ::std::marker::Copy for FieldBehavior { +impl ::protobuf::EnumFull for FieldBehavior { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().enum_by_package_relative_name("FieldBehavior").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } } impl ::std::default::Default for FieldBehavior { @@ -88,16 +122,16 @@ impl ::std::default::Default for FieldBehavior { } } -impl ::protobuf::reflect::ProtobufValue for FieldBehavior { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) +impl FieldBehavior { + fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("FieldBehavior") } } /// Extension fields pub mod exts { - pub const field_behavior: ::protobuf::ext::ExtFieldRepeated<::protobuf::descriptor::FieldOptions, ::protobuf::types::ProtobufTypeEnum> = ::protobuf::ext::ExtFieldRepeated { field_number: 1052, phantom: ::std::marker::PhantomData }; + pub const field_behavior: ::protobuf::ext::ExtFieldRepeated<::protobuf::descriptor::FieldOptions, ::protobuf::EnumOrUnknown> = ::protobuf::ext::ExtFieldRepeated::new(1052, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_ENUM); } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -106,123 +140,142 @@ static file_descriptor_proto_data: &'static [u8] = b"\ IOR_UNSPECIFIED\x10\0\x12\x0c\n\x08OPTIONAL\x10\x01\x12\x0c\n\x08REQUIRE\ D\x10\x02\x12\x0f\n\x0bOUTPUT_ONLY\x10\x03\x12\x0e\n\nINPUT_ONLY\x10\x04\ \x12\r\n\tIMMUTABLE\x10\x05\x12\x12\n\x0eUNORDERED_LIST\x10\x06\x12\x15\ - \n\x11NON_EMPTY_DEFAULT\x10\x07\x12\x0e\n\nIDENTIFIER\x10\x08:`\n\x0efie\ + \n\x11NON_EMPTY_DEFAULT\x10\x07\x12\x0e\n\nIDENTIFIER\x10\x08:d\n\x0efie\ ld_behavior\x18\x9c\x08\x20\x03(\x0e2\x19.google.api.FieldBehavior\x12\ - \x1d.google.protobuf.FieldOptionsR\rfieldBehaviorBp\n\x0ecom.google.apiB\ - \x12FieldBehaviorProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/a\ - nnotations;annotations\xa2\x02\x04GAPIJ\xe2\x1f\n\x06\x12\x04\x0e\0g\x01\ - \n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20\ - Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20V\ - ersion\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20\ - this\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\x13\n\t\n\x02\x03\0\ - \x12\x03\x12\0*\n\x08\n\x01\x08\x12\x03\x14\0X\n\t\n\x02\x08\x0b\x12\x03\ - \x14\0X\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\03\n\t\n\x02\x08\x08\x12\x03\x16\03\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\t\n\x01\x07\x12\x04\ - \x1a\0(\x01\n\xda\x03\n\x02\x07\0\x12\x03'\x02:\x1a\xce\x03\x20A\x20desi\ - gnation\x20of\x20a\x20specific\x20field\x20behavior\x20(required,\x20out\ - put\x20only,\x20etc.)\n\x20in\x20protobuf\x20messages.\n\n\x20Examples:\ - \n\n\x20\x20\x20string\x20name\x20=\x201\x20[(google.api.field_behavior)\ - \x20=\x20REQUIRED];\n\x20\x20\x20State\x20state\x20=\x201\x20[(google.ap\ - i.field_behavior)\x20=\x20OUTPUT_ONLY];\n\x20\x20\x20google.protobuf.Dur\ - ation\x20ttl\x20=\x201\n\x20\x20\x20\x20\x20[(google.api.field_behavior)\ - \x20=\x20INPUT_ONLY];\n\x20\x20\x20google.protobuf.Timestamp\x20expire_t\ - ime\x20=\x201\n\x20\x20\x20\x20\x20[(google.api.field_behavior)\x20=\x20\ - OUTPUT_ONLY,\n\x20\x20\x20\x20\x20\x20(google.api.field_behavior)\x20=\ - \x20IMMUTABLE];\n\n\n\n\x03\x07\0\x02\x12\x03\x1a\x07#\n\n\n\x03\x07\0\ - \x04\x12\x03'\x02\n\n\n\n\x03\x07\0\x06\x12\x03'\x0b#\n\n\n\x03\x07\0\ - \x01\x12\x03'$2\n\n\n\x03\x07\0\x03\x12\x03'59\n\xea\x02\n\x02\x05\0\x12\ - \x040\0g\x01\x1a\xdd\x02\x20An\x20indicator\x20of\x20the\x20behavior\x20\ - of\x20a\x20given\x20field\x20(for\x20example,\x20that\x20a\x20field\n\ - \x20is\x20required\x20in\x20requests,\x20or\x20given\x20as\x20output\x20\ - but\x20ignored\x20as\x20input).\n\x20This\x20**does\x20not**\x20change\ - \x20the\x20behavior\x20in\x20protocol\x20buffers\x20itself;\x20it\x20onl\ - y\n\x20denotes\x20the\x20behavior\x20and\x20may\x20affect\x20how\x20API\ - \x20tooling\x20handles\x20the\x20field.\n\n\x20Note:\x20This\x20enum\x20\ - **may**\x20receive\x20new\x20values\x20in\x20the\x20future.\n\n\n\n\x03\ - \x05\0\x01\x12\x030\x05\x12\n?\n\x04\x05\0\x02\0\x12\x032\x02!\x1a2\x20C\ - onventional\x20default\x20for\x20enums.\x20Do\x20not\x20use\x20this.\n\n\ - \x0c\n\x05\x05\0\x02\0\x01\x12\x032\x02\x1c\n\x0c\n\x05\x05\0\x02\0\x02\ - \x12\x032\x1f\x20\n\xa1\x01\n\x04\x05\0\x02\x01\x12\x037\x02\x0f\x1a\x93\ - \x01\x20Specifically\x20denotes\x20a\x20field\x20as\x20optional.\n\x20Wh\ - ile\x20all\x20fields\x20in\x20protocol\x20buffers\x20are\x20optional,\ - \x20this\x20may\x20be\x20specified\n\x20for\x20emphasis\x20if\x20appropr\ - iate.\n\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x037\x02\n\n\x0c\n\x05\x05\0\ - \x02\x01\x02\x12\x037\r\x0e\n\xc0\x01\n\x04\x05\0\x02\x02\x12\x03<\x02\ - \x0f\x1a\xb2\x01\x20Denotes\x20a\x20field\x20as\x20required.\n\x20This\ - \x20indicates\x20that\x20the\x20field\x20**must**\x20be\x20provided\x20a\ - s\x20part\x20of\x20the\x20request,\n\x20and\x20failure\x20to\x20do\x20so\ - \x20will\x20cause\x20an\x20error\x20(usually\x20`INVALID_ARGUMENT`).\n\n\ - \x0c\n\x05\x05\0\x02\x02\x01\x12\x03<\x02\n\n\x0c\n\x05\x05\0\x02\x02\ - \x02\x12\x03<\r\x0e\n\xfd\x01\n\x04\x05\0\x02\x03\x12\x03B\x02\x12\x1a\ - \xef\x01\x20Denotes\x20a\x20field\x20as\x20output\x20only.\n\x20This\x20\ - indicates\x20that\x20the\x20field\x20is\x20provided\x20in\x20responses,\ - \x20but\x20including\x20the\n\x20field\x20in\x20a\x20request\x20does\x20\ - nothing\x20(the\x20server\x20*must*\x20ignore\x20it\x20and\n\x20*must\ - \x20not*\x20throw\x20an\x20error\x20as\x20a\x20result\x20of\x20the\x20fi\ - eld's\x20presence).\n\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03B\x02\r\n\x0c\ - \n\x05\x05\0\x02\x03\x02\x12\x03B\x10\x11\n\x9e\x01\n\x04\x05\0\x02\x04\ - \x12\x03G\x02\x11\x1a\x90\x01\x20Denotes\x20a\x20field\x20as\x20input\ - \x20only.\n\x20This\x20indicates\x20that\x20the\x20field\x20is\x20provid\ - ed\x20in\x20requests,\x20and\x20the\n\x20corresponding\x20field\x20is\ - \x20not\x20included\x20in\x20output.\n\n\x0c\n\x05\x05\0\x02\x04\x01\x12\ - \x03G\x02\x0c\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03G\x0f\x10\n\xa3\x01\n\ - \x04\x05\0\x02\x05\x12\x03L\x02\x10\x1a\x95\x01\x20Denotes\x20a\x20field\ - \x20as\x20immutable.\n\x20This\x20indicates\x20that\x20the\x20field\x20m\ - ay\x20be\x20set\x20once\x20in\x20a\x20request\x20to\x20create\x20a\n\x20\ - resource,\x20but\x20may\x20not\x20be\x20changed\x20thereafter.\n\n\x0c\n\ - \x05\x05\0\x02\x05\x01\x12\x03L\x02\x0b\n\x0c\n\x05\x05\0\x02\x05\x02\ - \x12\x03L\x0e\x0f\n\x93\x02\n\x04\x05\0\x02\x06\x12\x03R\x02\x15\x1a\x85\ - \x02\x20Denotes\x20that\x20a\x20(repeated)\x20field\x20is\x20an\x20unord\ - ered\x20list.\n\x20This\x20indicates\x20that\x20the\x20service\x20may\ - \x20provide\x20the\x20elements\x20of\x20the\x20list\n\x20in\x20any\x20ar\ - bitrary\x20\x20order,\x20rather\x20than\x20the\x20order\x20the\x20user\ - \x20originally\n\x20provided.\x20Additionally,\x20the\x20list's\x20order\ - \x20may\x20or\x20may\x20not\x20be\x20stable.\n\n\x0c\n\x05\x05\0\x02\x06\ - \x01\x12\x03R\x02\x10\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03R\x13\x14\n\ - \x81\x02\n\x04\x05\0\x02\x07\x12\x03X\x02\x18\x1a\xf3\x01\x20Denotes\x20\ - that\x20this\x20field\x20returns\x20a\x20non-empty\x20default\x20value\ - \x20if\x20not\x20set.\n\x20This\x20indicates\x20that\x20if\x20the\x20use\ - r\x20provides\x20the\x20empty\x20value\x20in\x20a\x20request,\n\x20a\x20\ - non-empty\x20value\x20will\x20be\x20returned.\x20The\x20user\x20will\x20\ - not\x20be\x20aware\x20of\x20what\n\x20non-empty\x20value\x20to\x20expect\ - .\n\n\x0c\n\x05\x05\0\x02\x07\x01\x12\x03X\x02\x13\n\x0c\n\x05\x05\0\x02\ - \x07\x02\x12\x03X\x16\x17\n\xf8\x04\n\x04\x05\0\x02\x08\x12\x03f\x02\x11\ - \x1a\xea\x04\x20Denotes\x20that\x20the\x20field\x20in\x20a\x20resource\ - \x20(a\x20message\x20annotated\x20with\n\x20google.api.resource)\x20is\ - \x20used\x20in\x20the\x20resource\x20name\x20to\x20uniquely\x20identify\ - \x20the\n\x20resource.\x20For\x20AIP-compliant\x20APIs,\x20this\x20shoul\ - d\x20only\x20be\x20applied\x20to\x20the\n\x20`name`\x20field\x20on\x20th\ - e\x20resource.\n\n\x20This\x20behavior\x20should\x20not\x20be\x20applied\ - \x20to\x20references\x20to\x20other\x20resources\x20within\n\x20the\x20m\ - essage.\n\n\x20The\x20identifier\x20field\x20of\x20resources\x20often\ - \x20have\x20different\x20field\x20behavior\n\x20depending\x20on\x20the\ - \x20request\x20it\x20is\x20embedded\x20in\x20(e.g.\x20for\x20Create\x20m\ - ethods\x20name\n\x20is\x20optional\x20and\x20unused,\x20while\x20for\x20\ - Update\x20methods\x20it\x20is\x20required).\x20Instead\n\x20of\x20method\ - -specific\x20annotations,\x20only\x20`IDENTIFIER`\x20is\x20required.\n\n\ - \x0c\n\x05\x05\0\x02\x08\x01\x12\x03f\x02\x0c\n\x0c\n\x05\x05\0\x02\x08\ - \x02\x12\x03f\x0f\x10b\x06proto3\ + \x1d.google.protobuf.FieldOptionsR\rfieldBehaviorB\x02\x10\0Bp\n\x0ecom.\ + google.apiB\x12FieldBehaviorProtoP\x01ZAgoogle.golang.org/genproto/googl\ + eapis/api/annotations;annotations\xa2\x02\x04GAPIJ\xfb\x1f\n\x06\x12\x04\ + \x0e\0g\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\ + \x202024\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20L\ + icense,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20no\ + t\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\x13\ + \n\t\n\x02\x03\0\x12\x03\x12\0*\n\x08\n\x01\x08\x12\x03\x14\0X\n\t\n\x02\ + \x08\x0b\x12\x03\x14\0X\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\03\n\t\n\x02\x08\x08\x12\ + \x03\x16\03\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\t\n\ + \x01\x07\x12\x04\x1a\0(\x01\n\xda\x03\n\x02\x07\0\x12\x03'\x02K\x1a\xce\ + \x03\x20A\x20designation\x20of\x20a\x20specific\x20field\x20behavior\x20\ + (required,\x20output\x20only,\x20etc.)\n\x20in\x20protobuf\x20messages.\ + \n\n\x20Examples:\n\n\x20\x20\x20string\x20name\x20=\x201\x20[(google.ap\ + i.field_behavior)\x20=\x20REQUIRED];\n\x20\x20\x20State\x20state\x20=\ + \x201\x20[(google.api.field_behavior)\x20=\x20OUTPUT_ONLY];\n\x20\x20\ + \x20google.protobuf.Duration\x20ttl\x20=\x201\n\x20\x20\x20\x20\x20[(goo\ + gle.api.field_behavior)\x20=\x20INPUT_ONLY];\n\x20\x20\x20google.protobu\ + f.Timestamp\x20expire_time\x20=\x201\n\x20\x20\x20\x20\x20[(google.api.f\ + ield_behavior)\x20=\x20OUTPUT_ONLY,\n\x20\x20\x20\x20\x20\x20(google.api\ + .field_behavior)\x20=\x20IMMUTABLE];\n\n\n\n\x03\x07\0\x02\x12\x03\x1a\ + \x07#\n\n\n\x03\x07\0\x04\x12\x03'\x02\n\n\n\n\x03\x07\0\x06\x12\x03'\ + \x0b#\n\n\n\x03\x07\0\x01\x12\x03'$2\n\n\n\x03\x07\0\x03\x12\x03'59\n\n\ + \n\x03\x07\0\x08\x12\x03':J\n\x0b\n\x04\x07\0\x08\x02\x12\x03';I\n\xea\ + \x02\n\x02\x05\0\x12\x040\0g\x01\x1a\xdd\x02\x20An\x20indicator\x20of\ + \x20the\x20behavior\x20of\x20a\x20given\x20field\x20(for\x20example,\x20\ + that\x20a\x20field\n\x20is\x20required\x20in\x20requests,\x20or\x20given\ + \x20as\x20output\x20but\x20ignored\x20as\x20input).\n\x20This\x20**does\ + \x20not**\x20change\x20the\x20behavior\x20in\x20protocol\x20buffers\x20i\ + tself;\x20it\x20only\n\x20denotes\x20the\x20behavior\x20and\x20may\x20af\ + fect\x20how\x20API\x20tooling\x20handles\x20the\x20field.\n\n\x20Note:\ + \x20This\x20enum\x20**may**\x20receive\x20new\x20values\x20in\x20the\x20\ + future.\n\n\n\n\x03\x05\0\x01\x12\x030\x05\x12\n?\n\x04\x05\0\x02\0\x12\ + \x032\x02!\x1a2\x20Conventional\x20default\x20for\x20enums.\x20Do\x20not\ + \x20use\x20this.\n\n\x0c\n\x05\x05\0\x02\0\x01\x12\x032\x02\x1c\n\x0c\n\ + \x05\x05\0\x02\0\x02\x12\x032\x1f\x20\n\xa1\x01\n\x04\x05\0\x02\x01\x12\ + \x037\x02\x0f\x1a\x93\x01\x20Specifically\x20denotes\x20a\x20field\x20as\ + \x20optional.\n\x20While\x20all\x20fields\x20in\x20protocol\x20buffers\ + \x20are\x20optional,\x20this\x20may\x20be\x20specified\n\x20for\x20empha\ + sis\x20if\x20appropriate.\n\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x037\x02\n\ + \n\x0c\n\x05\x05\0\x02\x01\x02\x12\x037\r\x0e\n\xc0\x01\n\x04\x05\0\x02\ + \x02\x12\x03<\x02\x0f\x1a\xb2\x01\x20Denotes\x20a\x20field\x20as\x20requ\ + ired.\n\x20This\x20indicates\x20that\x20the\x20field\x20**must**\x20be\ + \x20provided\x20as\x20part\x20of\x20the\x20request,\n\x20and\x20failure\ + \x20to\x20do\x20so\x20will\x20cause\x20an\x20error\x20(usually\x20`INVAL\ + ID_ARGUMENT`).\n\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03<\x02\n\n\x0c\n\ + \x05\x05\0\x02\x02\x02\x12\x03<\r\x0e\n\xfd\x01\n\x04\x05\0\x02\x03\x12\ + \x03B\x02\x12\x1a\xef\x01\x20Denotes\x20a\x20field\x20as\x20output\x20on\ + ly.\n\x20This\x20indicates\x20that\x20the\x20field\x20is\x20provided\x20\ + in\x20responses,\x20but\x20including\x20the\n\x20field\x20in\x20a\x20req\ + uest\x20does\x20nothing\x20(the\x20server\x20*must*\x20ignore\x20it\x20a\ + nd\n\x20*must\x20not*\x20throw\x20an\x20error\x20as\x20a\x20result\x20of\ + \x20the\x20field's\x20presence).\n\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\ + B\x02\r\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03B\x10\x11\n\x9e\x01\n\x04\ + \x05\0\x02\x04\x12\x03G\x02\x11\x1a\x90\x01\x20Denotes\x20a\x20field\x20\ + as\x20input\x20only.\n\x20This\x20indicates\x20that\x20the\x20field\x20i\ + s\x20provided\x20in\x20requests,\x20and\x20the\n\x20corresponding\x20fie\ + ld\x20is\x20not\x20included\x20in\x20output.\n\n\x0c\n\x05\x05\0\x02\x04\ + \x01\x12\x03G\x02\x0c\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03G\x0f\x10\n\ + \xa3\x01\n\x04\x05\0\x02\x05\x12\x03L\x02\x10\x1a\x95\x01\x20Denotes\x20\ + a\x20field\x20as\x20immutable.\n\x20This\x20indicates\x20that\x20the\x20\ + field\x20may\x20be\x20set\x20once\x20in\x20a\x20request\x20to\x20create\ + \x20a\n\x20resource,\x20but\x20may\x20not\x20be\x20changed\x20thereafter\ + .\n\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03L\x02\x0b\n\x0c\n\x05\x05\0\x02\ + \x05\x02\x12\x03L\x0e\x0f\n\x93\x02\n\x04\x05\0\x02\x06\x12\x03R\x02\x15\ + \x1a\x85\x02\x20Denotes\x20that\x20a\x20(repeated)\x20field\x20is\x20an\ + \x20unordered\x20list.\n\x20This\x20indicates\x20that\x20the\x20service\ + \x20may\x20provide\x20the\x20elements\x20of\x20the\x20list\n\x20in\x20an\ + y\x20arbitrary\x20\x20order,\x20rather\x20than\x20the\x20order\x20the\ + \x20user\x20originally\n\x20provided.\x20Additionally,\x20the\x20list's\ + \x20order\x20may\x20or\x20may\x20not\x20be\x20stable.\n\n\x0c\n\x05\x05\ + \0\x02\x06\x01\x12\x03R\x02\x10\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03R\ + \x13\x14\n\x81\x02\n\x04\x05\0\x02\x07\x12\x03X\x02\x18\x1a\xf3\x01\x20D\ + enotes\x20that\x20this\x20field\x20returns\x20a\x20non-empty\x20default\ + \x20value\x20if\x20not\x20set.\n\x20This\x20indicates\x20that\x20if\x20t\ + he\x20user\x20provides\x20the\x20empty\x20value\x20in\x20a\x20request,\n\ + \x20a\x20non-empty\x20value\x20will\x20be\x20returned.\x20The\x20user\ + \x20will\x20not\x20be\x20aware\x20of\x20what\n\x20non-empty\x20value\x20\ + to\x20expect.\n\n\x0c\n\x05\x05\0\x02\x07\x01\x12\x03X\x02\x13\n\x0c\n\ + \x05\x05\0\x02\x07\x02\x12\x03X\x16\x17\n\xf8\x04\n\x04\x05\0\x02\x08\ + \x12\x03f\x02\x11\x1a\xea\x04\x20Denotes\x20that\x20the\x20field\x20in\ + \x20a\x20resource\x20(a\x20message\x20annotated\x20with\n\x20google.api.\ + resource)\x20is\x20used\x20in\x20the\x20resource\x20name\x20to\x20unique\ + ly\x20identify\x20the\n\x20resource.\x20For\x20AIP-compliant\x20APIs,\ + \x20this\x20should\x20only\x20be\x20applied\x20to\x20the\n\x20`name`\x20\ + field\x20on\x20the\x20resource.\n\n\x20This\x20behavior\x20should\x20not\ + \x20be\x20applied\x20to\x20references\x20to\x20other\x20resources\x20wit\ + hin\n\x20the\x20message.\n\n\x20The\x20identifier\x20field\x20of\x20reso\ + urces\x20often\x20have\x20different\x20field\x20behavior\n\x20depending\ + \x20on\x20the\x20request\x20it\x20is\x20embedded\x20in\x20(e.g.\x20for\ + \x20Create\x20methods\x20name\n\x20is\x20optional\x20and\x20unused,\x20w\ + hile\x20for\x20Update\x20methods\x20it\x20is\x20required).\x20Instead\n\ + \x20of\x20method-specific\x20annotations,\x20only\x20`IDENTIFIER`\x20is\ + \x20required.\n\n\x0c\n\x05\x05\0\x02\x08\x01\x12\x03f\x02\x0c\n\x0c\n\ + \x05\x05\0\x02\x08\x02\x12\x03f\x0f\x10b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(1); + deps.push(::protobuf::descriptor::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(0); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(FieldBehavior::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/field_info.rs b/googleapis-raw/src/api/field_info.rs new file mode 100644 index 0000000..c6f6629 --- /dev/null +++ b/googleapis-raw/src/api/field_info.rs @@ -0,0 +1,547 @@ +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... +// @generated + +// https://github.com/rust-lang/rust-clippy/issues/702 +#![allow(unknown_lints)] +#![allow(clippy::all)] + +#![allow(unused_attributes)] +#![cfg_attr(rustfmt, rustfmt::skip)] + + +#![allow(dead_code)] +#![allow(missing_docs)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(non_upper_case_globals)] +#![allow(trivial_casts)] +#![allow(unused_results)] +#![allow(unused_mut)] + +//! Generated file from `google/api/field_info.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; + +/// Rich semantic information of an API field beyond basic typing. +// @@protoc_insertion_point(message:google.api.FieldInfo) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct FieldInfo { + // message fields + /// The standard format of a field value. This does not explicitly configure + /// any API consumer, just documents the API's format for the field it is + /// applied to. + // @@protoc_insertion_point(field:google.api.FieldInfo.format) + pub format: ::protobuf::EnumOrUnknown, + /// The type(s) that the annotated, generic field may represent. + /// + /// Currently, this must only be used on fields of type `google.protobuf.Any`. + /// Supporting other generic types may be considered in the future. + // @@protoc_insertion_point(field:google.api.FieldInfo.referenced_types) + pub referenced_types: ::std::vec::Vec, + // special fields + // @@protoc_insertion_point(special_field:google.api.FieldInfo.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a FieldInfo { + fn default() -> &'a FieldInfo { + ::default_instance() + } +} + +impl FieldInfo { + pub fn new() -> FieldInfo { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "format", + |m: &FieldInfo| { &m.format }, + |m: &mut FieldInfo| { &mut m.format }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "referenced_types", + |m: &FieldInfo| { &m.referenced_types }, + |m: &mut FieldInfo| { &mut m.referenced_types }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "FieldInfo", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for FieldInfo { + const NAME: &'static str = "FieldInfo"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.format = is.read_enum_or_unknown()?; + }, + 18 => { + self.referenced_types.push(is.read_message()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if self.format != ::protobuf::EnumOrUnknown::new(field_info::Format::FORMAT_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(1, self.format.value()); + } + for value in &self.referenced_types { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if self.format != ::protobuf::EnumOrUnknown::new(field_info::Format::FORMAT_UNSPECIFIED) { + os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.format))?; + } + for v in &self.referenced_types { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> FieldInfo { + FieldInfo::new() + } + + fn clear(&mut self) { + self.format = ::protobuf::EnumOrUnknown::new(field_info::Format::FORMAT_UNSPECIFIED); + self.referenced_types.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static FieldInfo { + static instance: FieldInfo = FieldInfo { + format: ::protobuf::EnumOrUnknown::from_i32(0), + referenced_types: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for FieldInfo { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("FieldInfo").unwrap()).clone() + } +} + +impl ::std::fmt::Display for FieldInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for FieldInfo { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +/// Nested message and enums of message `FieldInfo` +pub mod field_info { + /// The standard format of a field value. The supported formats are all backed + /// by either an RFC defined by the IETF or a Google-defined AIP. + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.FieldInfo.Format) + pub enum Format { + // @@protoc_insertion_point(enum_value:google.api.FieldInfo.Format.FORMAT_UNSPECIFIED) + FORMAT_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.FieldInfo.Format.UUID4) + UUID4 = 1, + // @@protoc_insertion_point(enum_value:google.api.FieldInfo.Format.IPV4) + IPV4 = 2, + // @@protoc_insertion_point(enum_value:google.api.FieldInfo.Format.IPV6) + IPV6 = 3, + // @@protoc_insertion_point(enum_value:google.api.FieldInfo.Format.IPV4_OR_IPV6) + IPV4_OR_IPV6 = 4, + } + + impl ::protobuf::Enum for Format { + const NAME: &'static str = "Format"; + + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Format::FORMAT_UNSPECIFIED), + 1 => ::std::option::Option::Some(Format::UUID4), + 2 => ::std::option::Option::Some(Format::IPV4), + 3 => ::std::option::Option::Some(Format::IPV6), + 4 => ::std::option::Option::Some(Format::IPV4_OR_IPV6), + _ => ::std::option::Option::None + } + } + + fn from_str(str: &str) -> ::std::option::Option { + match str { + "FORMAT_UNSPECIFIED" => ::std::option::Option::Some(Format::FORMAT_UNSPECIFIED), + "UUID4" => ::std::option::Option::Some(Format::UUID4), + "IPV4" => ::std::option::Option::Some(Format::IPV4), + "IPV6" => ::std::option::Option::Some(Format::IPV6), + "IPV4_OR_IPV6" => ::std::option::Option::Some(Format::IPV4_OR_IPV6), + _ => ::std::option::Option::None + } + } + + const VALUES: &'static [Format] = &[ + Format::FORMAT_UNSPECIFIED, + Format::UUID4, + Format::IPV4, + Format::IPV6, + Format::IPV4_OR_IPV6, + ]; + } + + impl ::protobuf::EnumFull for Format { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("FieldInfo.Format").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } + } + + impl ::std::default::Default for Format { + fn default() -> Self { + Format::FORMAT_UNSPECIFIED + } + } + + impl Format { + pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("FieldInfo.Format") + } + } +} + +/// A reference to a message type, for use in [FieldInfo][google.api.FieldInfo]. +// @@protoc_insertion_point(message:google.api.TypeReference) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct TypeReference { + // message fields + /// The name of the type that the annotated, generic field may represent. + /// If the type is in the same protobuf package, the value can be the simple + /// message name e.g., `"MyMessage"`. Otherwise, the value must be the + /// fully-qualified message name e.g., `"google.library.v1.Book"`. + /// + /// If the type(s) are unknown to the service (e.g. the field accepts generic + /// user input), use the wildcard `"*"` to denote this behavior. + /// + /// See [AIP-202](https://google.aip.dev/202#type-references) for more details. + // @@protoc_insertion_point(field:google.api.TypeReference.type_name) + pub type_name: ::std::string::String, + // special fields + // @@protoc_insertion_point(special_field:google.api.TypeReference.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a TypeReference { + fn default() -> &'a TypeReference { + ::default_instance() + } +} + +impl TypeReference { + pub fn new() -> TypeReference { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "type_name", + |m: &TypeReference| { &m.type_name }, + |m: &mut TypeReference| { &mut m.type_name }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "TypeReference", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for TypeReference { + const NAME: &'static str = "TypeReference"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.type_name = is.read_string()?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if !self.type_name.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.type_name); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.type_name.is_empty() { + os.write_string(1, &self.type_name)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> TypeReference { + TypeReference::new() + } + + fn clear(&mut self) { + self.type_name.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static TypeReference { + static instance: TypeReference = TypeReference { + type_name: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for TypeReference { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("TypeReference").unwrap()).clone() + } +} + +impl ::std::fmt::Display for TypeReference { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for TypeReference { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +/// Extension fields +pub mod exts { + + pub const field_info: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, super::FieldInfo> = ::protobuf::ext::ExtFieldOptional::new(291403980, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_MESSAGE); +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\x1bgoogle/api/field_info.proto\x12\ngoogle.api\x1a\x20google/protobuf\ + /descriptor.proto\"\xda\x01\n\tFieldInfo\x124\n\x06format\x18\x01\x20\ + \x01(\x0e2\x1c.google.api.FieldInfo.FormatR\x06format\x12D\n\x10referenc\ + ed_types\x18\x02\x20\x03(\x0b2\x19.google.api.TypeReferenceR\x0freferenc\ + edTypes\"Q\n\x06Format\x12\x16\n\x12FORMAT_UNSPECIFIED\x10\0\x12\t\n\x05\ + UUID4\x10\x01\x12\x08\n\x04IPV4\x10\x02\x12\x08\n\x04IPV6\x10\x03\x12\ + \x10\n\x0cIPV4_OR_IPV6\x10\x04\",\n\rTypeReference\x12\x1b\n\ttype_name\ + \x18\x01\x20\x01(\tR\x08typeName:W\n\nfield_info\x18\xcc\xf1\xf9\x8a\x01\ + \x20\x01(\x0b2\x15.google.api.FieldInfo\x12\x1d.google.protobuf.FieldOpt\ + ionsR\tfieldInfoBl\n\x0ecom.google.apiB\x0eFieldInfoProtoP\x01ZAgoogle.g\ + olang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAP\ + IJ\x96!\n\x06\x12\x04\x0e\0i\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\ + \xb1\x04\x20Copyright\x202024\x20Google\x20LLC\n\n\x20Licensed\x20under\ + \x20the\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\");\ + \n\x20you\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20compli\ + ance\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\x20Unless\x20required\x20by\x20applicable\ + \x20law\x20or\x20agreed\x20to\x20in\x20writing,\x20software\n\x20distrib\ + uted\x20under\x20the\x20License\x20is\x20distributed\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\x20language\x20governing\x20permis\ + sions\x20and\n\x20limitations\x20under\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\0X\n\t\n\x02\x08\x0b\x12\x03\x14\0X\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\t\n\x01\x07\x12\x04\x1a\0-\x01\n\xde\x05\n\x02\ + \x07\0\x12\x03,\x02.\x1a\xd2\x05\x20Rich\x20semantic\x20descriptor\x20of\ + \x20an\x20API\x20field\x20beyond\x20the\x20basic\x20typing.\n\n\x20Examp\ + les:\n\n\x20\x20\x20\x20\x20string\x20request_id\x20=\x201\x20[(google.a\ + pi.field_info).format\x20=\x20UUID4];\n\x20\x20\x20\x20\x20string\x20old\ + _ip_address\x20=\x202\x20[(google.api.field_info).format\x20=\x20IPV4];\ + \n\x20\x20\x20\x20\x20string\x20new_ip_address\x20=\x203\x20[(google.api\ + .field_info).format\x20=\x20IPV6];\n\x20\x20\x20\x20\x20string\x20actual\ + _ip_address\x20=\x204\x20[\n\x20\x20\x20\x20\x20\x20\x20(google.api.fiel\ + d_info).format\x20=\x20IPV4_OR_IPV6\n\x20\x20\x20\x20\x20];\n\x20\x20\ + \x20\x20\x20google.protobuf.Any\x20generic_field\x20=\x205\x20[\n\x20\ + \x20\x20\x20\x20\x20\x20(google.api.field_info).referenced_types\x20=\ + \x20{type_name:\x20\"ActualType\"},\n\x20\x20\x20\x20\x20\x20\x20(google\ + .api.field_info).referenced_types\x20=\x20{type_name:\x20\"OtherType\"},\ + \n\x20\x20\x20\x20\x20];\n\x20\x20\x20\x20\x20google.protobuf.Any\x20gen\ + eric_user_input\x20=\x205\x20[\n\x20\x20\x20\x20\x20\x20\x20(google.api.\ + field_info).referenced_types\x20=\x20{type_name:\x20\"*\"},\n\x20\x20\ + \x20\x20\x20];\n\n\n\n\x03\x07\0\x02\x12\x03\x1a\x07#\n\n\n\x03\x07\0\ + \x06\x12\x03,\x02\x16\n\n\n\x03\x07\0\x01\x12\x03,\x17!\n\n\n\x03\x07\0\ + \x03\x12\x03,$-\nL\n\x02\x04\0\x12\x040\0[\x01\x1a@\x20Rich\x20semantic\ + \x20information\x20of\x20an\x20API\x20field\x20beyond\x20basic\x20typing\ + .\n\n\n\n\x03\x04\0\x01\x12\x030\x08\x11\n\x9a\x01\n\x04\x04\0\x04\0\x12\ + \x043\x02O\x03\x1a\x8b\x01\x20The\x20standard\x20format\x20of\x20a\x20fi\ + eld\x20value.\x20The\x20supported\x20formats\x20are\x20all\x20backed\n\ + \x20by\x20either\x20an\x20RFC\x20defined\x20by\x20the\x20IETF\x20or\x20a\ + \x20Google-defined\x20AIP.\n\n\x0c\n\x05\x04\0\x04\0\x01\x12\x033\x07\r\ + \n,\n\x06\x04\0\x04\0\x02\0\x12\x035\x04\x1b\x1a\x1d\x20Default,\x20unsp\ + ecified\x20value.\n\n\x0e\n\x07\x04\0\x04\0\x02\0\x01\x12\x035\x04\x16\n\ + \x0e\n\x07\x04\0\x04\0\x02\0\x02\x12\x035\x19\x1a\n\xba\x02\n\x06\x04\0\ + \x04\0\x02\x01\x12\x03<\x04\x0e\x1a\xaa\x02\x20Universally\x20Unique\x20\ + Identifier,\x20version\x204,\x20value\x20as\x20defined\x20by\n\x20https:\ + //datatracker.ietf.org/doc/html/rfc4122.\x20The\x20value\x20may\x20be\n\ + \x20normalized\x20to\x20entirely\x20lowercase\x20letters.\x20For\x20exam\ + ple,\x20the\x20value\n\x20`F47AC10B-58CC-0372-8567-0E02B2C3D479`\x20woul\ + d\x20be\x20normalized\x20to\n\x20`f47ac10b-58cc-0372-8567-0e02b2c3d479`.\ + \n\n\x0e\n\x07\x04\0\x04\0\x02\x01\x01\x12\x03<\x04\t\n\x0e\n\x07\x04\0\ + \x04\0\x02\x01\x02\x12\x03<\x0c\r\n\x81\x02\n\x06\x04\0\x04\0\x02\x02\ + \x12\x03B\x04\r\x1a\xf1\x01\x20Internet\x20Protocol\x20v4\x20value\x20as\ + \x20defined\x20by\x20[RFC\n\x20791](https://datatracker.ietf.org/doc/htm\ + l/rfc791).\x20The\x20value\x20may\x20be\n\x20condensed,\x20with\x20leadi\ + ng\x20zeros\x20in\x20each\x20octet\x20stripped.\x20For\x20example,\n\x20\ + `001.022.233.040`\x20would\x20be\x20condensed\x20to\x20`1.22.233.40`.\n\ + \n\x0e\n\x07\x04\0\x04\0\x02\x02\x01\x12\x03B\x04\x08\n\x0e\n\x07\x04\0\ + \x04\0\x02\x02\x02\x12\x03B\x0b\x0c\n\xdc\x02\n\x06\x04\0\x04\0\x02\x03\ + \x12\x03I\x04\r\x1a\xcc\x02\x20Internet\x20Protocol\x20v6\x20value\x20as\ + \x20defined\x20by\x20[RFC\n\x202460](https://datatracker.ietf.org/doc/ht\ + ml/rfc2460).\x20The\x20value\x20may\x20be\n\x20normalized\x20to\x20entir\ + ely\x20lowercase\x20letters\x20with\x20zeros\x20compressed,\x20following\ + \n\x20[RFC\x205952](https://datatracker.ietf.org/doc/html/rfc5952).\x20F\ + or\x20example,\n\x20the\x20value\x20`2001:0DB8:0::0`\x20would\x20be\x20n\ + ormalized\x20to\x20`2001:db8::`.\n\n\x0e\n\x07\x04\0\x04\0\x02\x03\x01\ + \x12\x03I\x04\x08\n\x0e\n\x07\x04\0\x04\0\x02\x03\x02\x12\x03I\x0b\x0c\n\ + \xc1\x01\n\x06\x04\0\x04\0\x02\x04\x12\x03N\x04\x15\x1a\xb1\x01\x20An\ + \x20IP\x20address\x20in\x20either\x20v4\x20or\x20v6\x20format\x20as\x20d\ + escribed\x20by\x20the\x20individual\n\x20values\x20defined\x20herein.\ + \x20See\x20the\x20comments\x20on\x20the\x20IPV4\x20and\x20IPV6\x20types\ + \x20for\n\x20allowed\x20normalizations\x20of\x20each.\n\n\x0e\n\x07\x04\ + \0\x04\0\x02\x04\x01\x12\x03N\x04\x10\n\x0e\n\x07\x04\0\x04\0\x02\x04\ + \x02\x12\x03N\x13\x14\n\xac\x01\n\x04\x04\0\x02\0\x12\x03T\x02\x14\x1a\ + \x9e\x01\x20The\x20standard\x20format\x20of\x20a\x20field\x20value.\x20T\ + his\x20does\x20not\x20explicitly\x20configure\n\x20any\x20API\x20consume\ + r,\x20just\x20documents\x20the\x20API's\x20format\x20for\x20the\x20field\ + \x20it\x20is\n\x20applied\x20to.\n\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03T\ + \x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03T\t\x0f\n\x0c\n\x05\x04\0\ + \x02\0\x03\x12\x03T\x12\x13\n\xda\x01\n\x04\x04\0\x02\x01\x12\x03Z\x02.\ + \x1a\xcc\x01\x20The\x20type(s)\x20that\x20the\x20annotated,\x20generic\ + \x20field\x20may\x20represent.\n\n\x20Currently,\x20this\x20must\x20only\ + \x20be\x20used\x20on\x20fields\x20of\x20type\x20`google.protobuf.Any`.\n\ + \x20Supporting\x20other\x20generic\x20types\x20may\x20be\x20considered\ + \x20in\x20the\x20future.\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03Z\x02\n\ + \n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03Z\x0b\x18\n\x0c\n\x05\x04\0\x02\ + \x01\x01\x12\x03Z\x19)\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03Z,-\nZ\n\x02\ + \x04\x01\x12\x04^\0i\x01\x1aN\x20A\x20reference\x20to\x20a\x20message\ + \x20type,\x20for\x20use\x20in\x20[FieldInfo][google.api.FieldInfo].\n\n\ + \n\n\x03\x04\x01\x01\x12\x03^\x08\x15\n\xfb\x03\n\x04\x04\x01\x02\0\x12\ + \x03h\x02\x17\x1a\xed\x03\x20The\x20name\x20of\x20the\x20type\x20that\ + \x20the\x20annotated,\x20generic\x20field\x20may\x20represent.\n\x20If\ + \x20the\x20type\x20is\x20in\x20the\x20same\x20protobuf\x20package,\x20th\ + e\x20value\x20can\x20be\x20the\x20simple\n\x20message\x20name\x20e.g.,\ + \x20`\"MyMessage\"`.\x20Otherwise,\x20the\x20value\x20must\x20be\x20the\ + \n\x20fully-qualified\x20message\x20name\x20e.g.,\x20`\"google.library.v\ + 1.Book\"`.\n\n\x20If\x20the\x20type(s)\x20are\x20unknown\x20to\x20the\ + \x20service\x20(e.g.\x20the\x20field\x20accepts\x20generic\n\x20user\x20\ + input),\x20use\x20the\x20wildcard\x20`\"*\"`\x20to\x20denote\x20this\x20\ + behavior.\n\n\x20See\x20[AIP-202](https://google.aip.dev/202#type-refere\ + nces)\x20for\x20more\x20details.\n\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\ + h\x02\x08\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03h\t\x12\n\x0c\n\x05\x04\ + \x01\x02\0\x03\x12\x03h\x15\x16b\x06proto3\ +"; + +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) +} + +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(1); + deps.push(::protobuf::descriptor::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(FieldInfo::generated_message_descriptor_data()); + messages.push(TypeReference::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(field_info::Format::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) + }) +} diff --git a/googleapis-raw/src/api/http.rs b/googleapis-raw/src/api/http.rs index 0594ce9..d4eb019 100644 --- a/googleapis-raw/src/api/http.rs +++ b/googleapis-raw/src/api/http.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,29 +9,45 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/http.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +/// Defines the HTTP configuration for an API service. It contains a list of +/// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +/// to one or more HTTP REST API methods. +// @@protoc_insertion_point(message:google.api.Http) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Http { // message fields - pub rules: ::protobuf::RepeatedField, + /// A list of HTTP configuration rules that apply to individual API methods. + /// + /// **NOTE:** All service configuration rules follow "last one wins" order. + // @@protoc_insertion_point(field:google.api.Http.rules) + pub rules: ::std::vec::Vec, + /// When set to true, URL path parameters will be fully URI-decoded except in + /// cases of single segment matches in reserved expansion, where "%2F" will be + /// left encoded. + /// + /// The default behavior is to not decode RFC 6570 reserved characters in multi + /// segment matches. + // @@protoc_insertion_point(field:google.api.Http.fully_decode_reserved_expansion) pub fully_decode_reserved_expansion: bool, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Http.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Http { @@ -44,73 +61,45 @@ impl Http { ::std::default::Default::default() } - // repeated .google.api.HttpRule rules = 1; - - - pub fn get_rules(&self) -> &[HttpRule] { - &self.rules - } - pub fn clear_rules(&mut self) { - self.rules.clear(); - } - - // Param is passed by value, moved - pub fn set_rules(&mut self, v: ::protobuf::RepeatedField) { - self.rules = v; - } - - // Mutable pointer to the field. - pub fn mut_rules(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.rules - } - - // Take field - pub fn take_rules(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.rules, ::protobuf::RepeatedField::new()) - } - - // bool fully_decode_reserved_expansion = 2; - - - pub fn get_fully_decode_reserved_expansion(&self) -> bool { - self.fully_decode_reserved_expansion - } - pub fn clear_fully_decode_reserved_expansion(&mut self) { - self.fully_decode_reserved_expansion = false; - } - - // Param is passed by value, moved - pub fn set_fully_decode_reserved_expansion(&mut self, v: bool) { - self.fully_decode_reserved_expansion = v; + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "rules", + |m: &Http| { &m.rules }, + |m: &mut Http| { &mut m.rules }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "fully_decode_reserved_expansion", + |m: &Http| { &m.fully_decode_reserved_expansion }, + |m: &mut Http| { &mut m.fully_decode_reserved_expansion }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Http", + fields, + oneofs, + ) } } impl ::protobuf::Message for Http { + const NAME: &'static str = "Http"; + fn is_initialized(&self) -> bool { - for v in &self.rules { - 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.rules)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.rules.push(is.read_message()?); }, - 2 => { - 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.fully_decode_reserved_expansion = tmp; + 16 => { + self.fully_decode_reserved_expansion = is.read_bool()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -119,123 +108,112 @@ impl ::protobuf::Message for Http { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.rules { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if self.fully_decode_reserved_expansion != false { - my_size += 2; + my_size += 1 + 1; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.rules { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; if self.fully_decode_reserved_expansion != false { os.write_bool(2, self.fully_decode_reserved_expansion)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Http { Http::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rules", - |m: &Http| { &m.rules }, - |m: &mut Http| { &mut m.rules }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "fully_decode_reserved_expansion", - |m: &Http| { &m.fully_decode_reserved_expansion }, - |m: &mut Http| { &mut m.fully_decode_reserved_expansion }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Http", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.rules.clear(); + self.fully_decode_reserved_expansion = false; + self.special_fields.clear(); } fn default_instance() -> &'static Http { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Http::new) + static instance: Http = Http { + rules: ::std::vec::Vec::new(), + fully_decode_reserved_expansion: false, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Http { - fn clear(&mut self) { - self.rules.clear(); - self.fully_decode_reserved_expansion = false; - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Http { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Http").unwrap()).clone() } } -impl ::std::fmt::Debug for Http { +impl ::std::fmt::Display for Http { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Http { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.HttpRule) +#[derive(PartialEq,Clone,Default,Debug)] pub struct HttpRule { // message fields + /// Selects a method to which this rule applies. + /// + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax + /// details. + // @@protoc_insertion_point(field:google.api.HttpRule.selector) pub selector: ::std::string::String, + /// The name of the request field whose value is mapped to the HTTP request + /// body, or `*` for mapping all request fields not captured by the path + /// pattern to the HTTP body, or omitted for not having any HTTP request body. + /// + /// NOTE: the referred field must be present at the top-level of the request + /// message type. + // @@protoc_insertion_point(field:google.api.HttpRule.body) pub body: ::std::string::String, + /// Optional. The name of the response field whose value is mapped to the HTTP + /// response body. When omitted, the entire response message will be used + /// as the HTTP response body. + /// + /// NOTE: The referred field must be present at the top-level of the response + /// message type. + // @@protoc_insertion_point(field:google.api.HttpRule.response_body) pub response_body: ::std::string::String, - pub additional_bindings: ::protobuf::RepeatedField, + /// Additional HTTP bindings for the selector. Nested bindings must + /// not contain an `additional_bindings` field themselves (that is, + /// the nesting may only be one level deep). + // @@protoc_insertion_point(field:google.api.HttpRule.additional_bindings) + pub additional_bindings: ::std::vec::Vec, // message oneof groups - pub pattern: ::std::option::Option, + pub pattern: ::std::option::Option, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.HttpRule.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a HttpRule { @@ -244,80 +222,44 @@ impl<'a> ::std::default::Default for &'a HttpRule { } } -#[derive(Clone,PartialEq,Debug)] -pub enum HttpRule_oneof_pattern { - get(::std::string::String), - put(::std::string::String), - post(::std::string::String), - delete(::std::string::String), - patch(::std::string::String), - custom(CustomHttpPattern), -} - impl HttpRule { pub fn new() -> HttpRule { ::std::default::Default::default() } - // string selector = 1; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - // string get = 2; - - pub fn get_get(&self) -> &str { + pub fn get(&self) -> &str { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::get(ref v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Get(ref v)) => v, _ => "", } } + pub fn clear_get(&mut self) { self.pattern = ::std::option::Option::None; } pub fn has_get(&self) -> bool { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::get(..)) => true, + ::std::option::Option::Some(http_rule::Pattern::Get(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_get(&mut self, v: ::std::string::String) { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::get(v)) + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Get(v)) } // Mutable pointer to the field. pub fn mut_get(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(HttpRule_oneof_pattern::get(_)) = self.pattern { + if let ::std::option::Option::Some(http_rule::Pattern::Get(_)) = self.pattern { } else { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::get(::std::string::String::new())); + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Get(::std::string::String::new())); } match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::get(ref mut v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Get(ref mut v)) => v, _ => panic!(), } } @@ -326,7 +268,7 @@ impl HttpRule { pub fn take_get(&mut self) -> ::std::string::String { if self.has_get() { match self.pattern.take() { - ::std::option::Option::Some(HttpRule_oneof_pattern::get(v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Get(v)) => v, _ => panic!(), } } else { @@ -336,37 +278,37 @@ impl HttpRule { // string put = 3; - - pub fn get_put(&self) -> &str { + pub fn put(&self) -> &str { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::put(ref v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Put(ref v)) => v, _ => "", } } + pub fn clear_put(&mut self) { self.pattern = ::std::option::Option::None; } pub fn has_put(&self) -> bool { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::put(..)) => true, + ::std::option::Option::Some(http_rule::Pattern::Put(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_put(&mut self, v: ::std::string::String) { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::put(v)) + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Put(v)) } // Mutable pointer to the field. pub fn mut_put(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(HttpRule_oneof_pattern::put(_)) = self.pattern { + if let ::std::option::Option::Some(http_rule::Pattern::Put(_)) = self.pattern { } else { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::put(::std::string::String::new())); + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Put(::std::string::String::new())); } match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::put(ref mut v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Put(ref mut v)) => v, _ => panic!(), } } @@ -375,7 +317,7 @@ impl HttpRule { pub fn take_put(&mut self) -> ::std::string::String { if self.has_put() { match self.pattern.take() { - ::std::option::Option::Some(HttpRule_oneof_pattern::put(v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Put(v)) => v, _ => panic!(), } } else { @@ -385,37 +327,37 @@ impl HttpRule { // string post = 4; - - pub fn get_post(&self) -> &str { + pub fn post(&self) -> &str { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::post(ref v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Post(ref v)) => v, _ => "", } } + pub fn clear_post(&mut self) { self.pattern = ::std::option::Option::None; } pub fn has_post(&self) -> bool { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::post(..)) => true, + ::std::option::Option::Some(http_rule::Pattern::Post(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_post(&mut self, v: ::std::string::String) { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::post(v)) + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Post(v)) } // Mutable pointer to the field. pub fn mut_post(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(HttpRule_oneof_pattern::post(_)) = self.pattern { + if let ::std::option::Option::Some(http_rule::Pattern::Post(_)) = self.pattern { } else { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::post(::std::string::String::new())); + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Post(::std::string::String::new())); } match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::post(ref mut v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Post(ref mut v)) => v, _ => panic!(), } } @@ -424,7 +366,7 @@ impl HttpRule { pub fn take_post(&mut self) -> ::std::string::String { if self.has_post() { match self.pattern.take() { - ::std::option::Option::Some(HttpRule_oneof_pattern::post(v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Post(v)) => v, _ => panic!(), } } else { @@ -434,37 +376,37 @@ impl HttpRule { // string delete = 5; - - pub fn get_delete(&self) -> &str { + pub fn delete(&self) -> &str { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::delete(ref v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Delete(ref v)) => v, _ => "", } } + pub fn clear_delete(&mut self) { self.pattern = ::std::option::Option::None; } pub fn has_delete(&self) -> bool { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::delete(..)) => true, + ::std::option::Option::Some(http_rule::Pattern::Delete(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_delete(&mut self, v: ::std::string::String) { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::delete(v)) + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Delete(v)) } // Mutable pointer to the field. pub fn mut_delete(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(HttpRule_oneof_pattern::delete(_)) = self.pattern { + if let ::std::option::Option::Some(http_rule::Pattern::Delete(_)) = self.pattern { } else { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::delete(::std::string::String::new())); + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Delete(::std::string::String::new())); } match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::delete(ref mut v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Delete(ref mut v)) => v, _ => panic!(), } } @@ -473,7 +415,7 @@ impl HttpRule { pub fn take_delete(&mut self) -> ::std::string::String { if self.has_delete() { match self.pattern.take() { - ::std::option::Option::Some(HttpRule_oneof_pattern::delete(v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Delete(v)) => v, _ => panic!(), } } else { @@ -483,37 +425,37 @@ impl HttpRule { // string patch = 6; - - pub fn get_patch(&self) -> &str { + pub fn patch(&self) -> &str { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::patch(ref v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Patch(ref v)) => v, _ => "", } } + pub fn clear_patch(&mut self) { self.pattern = ::std::option::Option::None; } pub fn has_patch(&self) -> bool { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::patch(..)) => true, + ::std::option::Option::Some(http_rule::Pattern::Patch(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_patch(&mut self, v: ::std::string::String) { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::patch(v)) + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Patch(v)) } // Mutable pointer to the field. pub fn mut_patch(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(HttpRule_oneof_pattern::patch(_)) = self.pattern { + if let ::std::option::Option::Some(http_rule::Pattern::Patch(_)) = self.pattern { } else { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::patch(::std::string::String::new())); + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Patch(::std::string::String::new())); } match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::patch(ref mut v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Patch(ref mut v)) => v, _ => panic!(), } } @@ -522,7 +464,7 @@ impl HttpRule { pub fn take_patch(&mut self) -> ::std::string::String { if self.has_patch() { match self.pattern.take() { - ::std::option::Option::Some(HttpRule_oneof_pattern::patch(v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Patch(v)) => v, _ => panic!(), } } else { @@ -532,37 +474,37 @@ impl HttpRule { // .google.api.CustomHttpPattern custom = 8; - - pub fn get_custom(&self) -> &CustomHttpPattern { + pub fn custom(&self) -> &CustomHttpPattern { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::custom(ref v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Custom(ref v)) => v, _ => ::default_instance(), } } + pub fn clear_custom(&mut self) { self.pattern = ::std::option::Option::None; } pub fn has_custom(&self) -> bool { match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::custom(..)) => true, + ::std::option::Option::Some(http_rule::Pattern::Custom(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_custom(&mut self, v: CustomHttpPattern) { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::custom(v)) + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Custom(v)) } // Mutable pointer to the field. pub fn mut_custom(&mut self) -> &mut CustomHttpPattern { - if let ::std::option::Option::Some(HttpRule_oneof_pattern::custom(_)) = self.pattern { + if let ::std::option::Option::Some(http_rule::Pattern::Custom(_)) = self.pattern { } else { - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::custom(CustomHttpPattern::new())); + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Custom(CustomHttpPattern::new())); } match self.pattern { - ::std::option::Option::Some(HttpRule_oneof_pattern::custom(ref mut v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Custom(ref mut v)) => v, _ => panic!(), } } @@ -571,7 +513,7 @@ impl HttpRule { pub fn take_custom(&mut self) -> CustomHttpPattern { if self.has_custom() { match self.pattern.take() { - ::std::option::Option::Some(HttpRule_oneof_pattern::custom(v)) => v, + ::std::option::Option::Some(http_rule::Pattern::Custom(v)) => v, _ => panic!(), } } else { @@ -579,153 +521,117 @@ impl HttpRule { } } - // string body = 7; - - - pub fn get_body(&self) -> &str { - &self.body - } - pub fn clear_body(&mut self) { - self.body.clear(); - } - - // Param is passed by value, moved - pub fn set_body(&mut self, v: ::std::string::String) { - self.body = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_body(&mut self) -> &mut ::std::string::String { - &mut self.body - } - - // Take field - pub fn take_body(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.body, ::std::string::String::new()) - } - - // string response_body = 12; - - - pub fn get_response_body(&self) -> &str { - &self.response_body - } - pub fn clear_response_body(&mut self) { - self.response_body.clear(); - } - - // Param is passed by value, moved - pub fn set_response_body(&mut self, v: ::std::string::String) { - self.response_body = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_response_body(&mut self) -> &mut ::std::string::String { - &mut self.response_body - } - - // Take field - pub fn take_response_body(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.response_body, ::std::string::String::new()) - } - - // repeated .google.api.HttpRule additional_bindings = 11; - - - pub fn get_additional_bindings(&self) -> &[HttpRule] { - &self.additional_bindings - } - pub fn clear_additional_bindings(&mut self) { - self.additional_bindings.clear(); - } - - // Param is passed by value, moved - pub fn set_additional_bindings(&mut self, v: ::protobuf::RepeatedField) { - self.additional_bindings = v; - } - - // Mutable pointer to the field. - pub fn mut_additional_bindings(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.additional_bindings - } - - // Take field - pub fn take_additional_bindings(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.additional_bindings, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(10); + let mut oneofs = ::std::vec::Vec::with_capacity(1); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &HttpRule| { &m.selector }, + |m: &mut HttpRule| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "get", + HttpRule::has_get, + HttpRule::get, + HttpRule::set_get, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "put", + HttpRule::has_put, + HttpRule::put, + HttpRule::set_put, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "post", + HttpRule::has_post, + HttpRule::post, + HttpRule::set_post, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "delete", + HttpRule::has_delete, + HttpRule::delete, + HttpRule::set_delete, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "patch", + HttpRule::has_patch, + HttpRule::patch, + HttpRule::set_patch, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, CustomHttpPattern>( + "custom", + HttpRule::has_custom, + HttpRule::custom, + HttpRule::mut_custom, + HttpRule::set_custom, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "body", + |m: &HttpRule| { &m.body }, + |m: &mut HttpRule| { &mut m.body }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "response_body", + |m: &HttpRule| { &m.response_body }, + |m: &mut HttpRule| { &mut m.response_body }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "additional_bindings", + |m: &HttpRule| { &m.additional_bindings }, + |m: &mut HttpRule| { &mut m.additional_bindings }, + )); + oneofs.push(http_rule::Pattern::generated_oneof_descriptor_data()); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "HttpRule", + fields, + oneofs, + ) } } impl ::protobuf::Message for HttpRule { + const NAME: &'static str = "HttpRule"; + fn is_initialized(&self) -> bool { - if let Some(HttpRule_oneof_pattern::custom(ref v)) = self.pattern { - if !v.is_initialized() { - return false; - } - } - for v in &self.additional_bindings { - 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.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.selector = is.read_string()?; }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::get(is.read_string()?)); + 18 => { + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Get(is.read_string()?)); }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::put(is.read_string()?)); + 26 => { + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Put(is.read_string()?)); }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::post(is.read_string()?)); + 34 => { + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Post(is.read_string()?)); }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::delete(is.read_string()?)); + 42 => { + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Delete(is.read_string()?)); }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::patch(is.read_string()?)); + 50 => { + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Patch(is.read_string()?)); }, - 8 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.pattern = ::std::option::Option::Some(HttpRule_oneof_pattern::custom(is.read_message()?)); + 66 => { + self.pattern = ::std::option::Option::Some(http_rule::Pattern::Custom(is.read_message()?)); }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.body)?; + 58 => { + self.body = is.read_string()?; }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.response_body)?; + 98 => { + self.response_body = is.read_string()?; }, - 11 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.additional_bindings)?; + 90 => { + self.additional_bindings.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -734,7 +640,7 @@ impl ::protobuf::Message for HttpRule { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.selector); @@ -747,37 +653,37 @@ impl ::protobuf::Message for HttpRule { } for value in &self.additional_bindings { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if let ::std::option::Option::Some(ref v) = self.pattern { match v { - &HttpRule_oneof_pattern::get(ref v) => { + &http_rule::Pattern::Get(ref v) => { my_size += ::protobuf::rt::string_size(2, &v); }, - &HttpRule_oneof_pattern::put(ref v) => { + &http_rule::Pattern::Put(ref v) => { my_size += ::protobuf::rt::string_size(3, &v); }, - &HttpRule_oneof_pattern::post(ref v) => { + &http_rule::Pattern::Post(ref v) => { my_size += ::protobuf::rt::string_size(4, &v); }, - &HttpRule_oneof_pattern::delete(ref v) => { + &http_rule::Pattern::Delete(ref v) => { my_size += ::protobuf::rt::string_size(5, &v); }, - &HttpRule_oneof_pattern::patch(ref v) => { + &http_rule::Pattern::Patch(ref v) => { my_size += ::protobuf::rt::string_size(6, &v); }, - &HttpRule_oneof_pattern::custom(ref v) => { + &http_rule::Pattern::Custom(ref v) => { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, }; } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(1, &self.selector)?; } @@ -788,137 +694,46 @@ impl ::protobuf::Message for HttpRule { os.write_string(12, &self.response_body)?; } for v in &self.additional_bindings { - os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?; }; if let ::std::option::Option::Some(ref v) = self.pattern { match v { - &HttpRule_oneof_pattern::get(ref v) => { + &http_rule::Pattern::Get(ref v) => { os.write_string(2, v)?; }, - &HttpRule_oneof_pattern::put(ref v) => { + &http_rule::Pattern::Put(ref v) => { os.write_string(3, v)?; }, - &HttpRule_oneof_pattern::post(ref v) => { + &http_rule::Pattern::Post(ref v) => { os.write_string(4, v)?; }, - &HttpRule_oneof_pattern::delete(ref v) => { + &http_rule::Pattern::Delete(ref v) => { os.write_string(5, v)?; }, - &HttpRule_oneof_pattern::patch(ref v) => { + &http_rule::Pattern::Patch(ref v) => { os.write_string(6, v)?; }, - &HttpRule_oneof_pattern::custom(ref v) => { - os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + &http_rule::Pattern::Custom(ref v) => { + ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; }, }; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> HttpRule { HttpRule::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &HttpRule| { &m.selector }, - |m: &mut HttpRule| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "get", - HttpRule::has_get, - HttpRule::get_get, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "put", - HttpRule::has_put, - HttpRule::get_put, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "post", - HttpRule::has_post, - HttpRule::get_post, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "delete", - HttpRule::has_delete, - HttpRule::get_delete, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "patch", - HttpRule::has_patch, - HttpRule::get_patch, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, CustomHttpPattern>( - "custom", - HttpRule::has_custom, - HttpRule::get_custom, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "body", - |m: &HttpRule| { &m.body }, - |m: &mut HttpRule| { &mut m.body }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "response_body", - |m: &HttpRule| { &m.response_body }, - |m: &mut HttpRule| { &mut m.response_body }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "additional_bindings", - |m: &HttpRule| { &m.additional_bindings }, - |m: &mut HttpRule| { &mut m.additional_bindings }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "HttpRule", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static HttpRule { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(HttpRule::new) - } -} - -impl ::protobuf::Clear for HttpRule { fn clear(&mut self) { self.selector.clear(); self.pattern = ::std::option::Option::None; @@ -930,30 +745,91 @@ impl ::protobuf::Clear for HttpRule { self.body.clear(); self.response_body.clear(); self.additional_bindings.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static HttpRule { + static instance: HttpRule = HttpRule { + selector: ::std::string::String::new(), + body: ::std::string::String::new(), + response_body: ::std::string::String::new(), + additional_bindings: ::std::vec::Vec::new(), + pattern: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for HttpRule { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("HttpRule").unwrap()).clone() } } -impl ::std::fmt::Debug for HttpRule { +impl ::std::fmt::Display for HttpRule { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for HttpRule { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +/// Nested message and enums of message `HttpRule` +pub mod http_rule { + + #[derive(Clone,PartialEq,Debug)] + #[non_exhaustive] + // @@protoc_insertion_point(oneof:google.api.HttpRule.pattern) + pub enum Pattern { + // @@protoc_insertion_point(oneof_field:google.api.HttpRule.get) + Get(::std::string::String), + // @@protoc_insertion_point(oneof_field:google.api.HttpRule.put) + Put(::std::string::String), + // @@protoc_insertion_point(oneof_field:google.api.HttpRule.post) + Post(::std::string::String), + // @@protoc_insertion_point(oneof_field:google.api.HttpRule.delete) + Delete(::std::string::String), + // @@protoc_insertion_point(oneof_field:google.api.HttpRule.patch) + Patch(::std::string::String), + // @@protoc_insertion_point(oneof_field:google.api.HttpRule.custom) + Custom(super::CustomHttpPattern), + } + + impl ::protobuf::Oneof for Pattern { + } + + impl ::protobuf::OneofFull for Pattern { + fn descriptor() -> ::protobuf::reflect::OneofDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| ::descriptor().oneof_by_name("pattern").unwrap()).clone() + } + } + + impl Pattern { + pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { + ::protobuf::reflect::GeneratedOneofDescriptorData::new::("pattern") + } } } -#[derive(PartialEq,Clone,Default)] +/// A custom pattern is used for defining custom HTTP verb. +// @@protoc_insertion_point(message:google.api.CustomHttpPattern) +#[derive(PartialEq,Clone,Default,Debug)] pub struct CustomHttpPattern { // message fields + /// The name of this custom HTTP verb. + // @@protoc_insertion_point(field:google.api.CustomHttpPattern.kind) pub kind: ::std::string::String, + /// The path matched by this custom verb. + // @@protoc_insertion_point(field:google.api.CustomHttpPattern.path) pub path: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.CustomHttpPattern.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CustomHttpPattern { @@ -967,76 +843,45 @@ impl CustomHttpPattern { ::std::default::Default::default() } - // string kind = 1; - - - pub fn get_kind(&self) -> &str { - &self.kind - } - pub fn clear_kind(&mut self) { - self.kind.clear(); - } - - // Param is passed by value, moved - pub fn set_kind(&mut self, v: ::std::string::String) { - self.kind = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_kind(&mut self) -> &mut ::std::string::String { - &mut self.kind - } - - // Take field - pub fn take_kind(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.kind, ::std::string::String::new()) - } - - // string path = 2; - - - pub fn get_path(&self) -> &str { - &self.path - } - pub fn clear_path(&mut self) { - self.path.clear(); - } - - // Param is passed by value, moved - pub fn set_path(&mut self, v: ::std::string::String) { - self.path = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_path(&mut self) -> &mut ::std::string::String { - &mut self.path - } - - // Take field - pub fn take_path(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.path, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "kind", + |m: &CustomHttpPattern| { &m.kind }, + |m: &mut CustomHttpPattern| { &mut m.kind }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "path", + |m: &CustomHttpPattern| { &m.path }, + |m: &mut CustomHttpPattern| { &mut m.path }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "CustomHttpPattern", + fields, + oneofs, + ) } } impl ::protobuf::Message for CustomHttpPattern { + const NAME: &'static str = "CustomHttpPattern"; + 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.kind)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.kind = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.path)?; + 18 => { + self.path = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1045,7 +890,7 @@ impl ::protobuf::Message for CustomHttpPattern { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.kind.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.kind); @@ -1053,98 +898,65 @@ impl ::protobuf::Message for CustomHttpPattern { if !self.path.is_empty() { my_size += ::protobuf::rt::string_size(2, &self.path); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.kind.is_empty() { os.write_string(1, &self.kind)?; } if !self.path.is_empty() { os.write_string(2, &self.path)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> CustomHttpPattern { CustomHttpPattern::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "kind", - |m: &CustomHttpPattern| { &m.kind }, - |m: &mut CustomHttpPattern| { &mut m.kind }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "path", - |m: &CustomHttpPattern| { &m.path }, - |m: &mut CustomHttpPattern| { &mut m.path }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CustomHttpPattern", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.kind.clear(); + self.path.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static CustomHttpPattern { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CustomHttpPattern::new) + static instance: CustomHttpPattern = CustomHttpPattern { + kind: ::std::string::String::new(), + path: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for CustomHttpPattern { - fn clear(&mut self) { - self.kind.clear(); - self.path.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for CustomHttpPattern { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("CustomHttpPattern").unwrap()).clone() } } -impl ::std::fmt::Debug for CustomHttpPattern { +impl ::std::fmt::Display for CustomHttpPattern { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CustomHttpPattern { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -1163,8 +975,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \n\x11CustomHttpPattern\x12\x12\n\x04kind\x18\x01\x20\x01(\tR\x04kind\ \x12\x12\n\x04path\x18\x02\x20\x01(\tR\x04pathBj\n\x0ecom.google.apiB\tH\ ttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;ann\ - otations\xf8\x01\x01\xa2\x02\x04GAPIJ\xb2s\n\x07\x12\x05\x0e\0\xfa\x02\ - \x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\ + otations\xf8\x01\x01\xa2\x02\x04GAPIJ\xfer\n\x07\x12\x05\x0e\0\xf2\x02\ + \x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\ \x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\ \x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20us\ e\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20Licens\ @@ -1202,20 +1014,20 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20is\x20to\x20not\x20decode\x20RFC\x206570\x20reserved\x20characters\ \x20in\x20multi\n\x20segment\x20matches.\n\n\x0c\n\x05\x04\0\x02\x01\x05\ \x12\x03(\x02\x06\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03(\x07&\n\x0c\n\ - \x05\x04\0\x02\x01\x03\x12\x03()*\n\xbbS\n\x02\x04\x01\x12\x06\xbb\x02\0\ - \xf1\x02\x01\x1a\xacS\x20#\x20gRPC\x20Transcoding\n\n\x20gRPC\x20Transco\ - ding\x20is\x20a\x20feature\x20for\x20mapping\x20between\x20a\x20gRPC\x20\ - method\x20and\x20one\x20or\n\x20more\x20HTTP\x20REST\x20endpoints.\x20It\ - \x20allows\x20developers\x20to\x20build\x20a\x20single\x20API\x20service\ - \n\x20that\x20supports\x20both\x20gRPC\x20APIs\x20and\x20REST\x20APIs.\ - \x20Many\x20systems,\x20including\x20[Google\n\x20APIs](https://github.c\ - om/googleapis/googleapis),\n\x20[Cloud\x20Endpoints](https://cloud.googl\ - e.com/endpoints),\x20[gRPC\n\x20Gateway](https://github.com/grpc-ecosyst\ - em/grpc-gateway),\n\x20and\x20[Envoy](https://github.com/envoyproxy/envo\ - y)\x20proxy\x20support\x20this\x20feature\n\x20and\x20use\x20it\x20for\ - \x20large\x20scale\x20production\x20services.\n\n\x20`HttpRule`\x20defin\ - es\x20the\x20schema\x20of\x20the\x20gRPC/REST\x20mapping.\x20The\x20mapp\ - ing\x20specifies\n\x20how\x20different\x20portions\x20of\x20the\x20gRPC\ + \x05\x04\0\x02\x01\x03\x12\x03()*\n\x87S\n\x02\x04\x01\x12\x06\xb3\x02\0\ + \xe9\x02\x01\x1a\xf8R\x20gRPC\x20Transcoding\n\n\x20gRPC\x20Transcoding\ + \x20is\x20a\x20feature\x20for\x20mapping\x20between\x20a\x20gRPC\x20meth\ + od\x20and\x20one\x20or\n\x20more\x20HTTP\x20REST\x20endpoints.\x20It\x20\ + allows\x20developers\x20to\x20build\x20a\x20single\x20API\x20service\n\ + \x20that\x20supports\x20both\x20gRPC\x20APIs\x20and\x20REST\x20APIs.\x20\ + Many\x20systems,\x20including\x20[Google\n\x20APIs](https://github.com/g\ + oogleapis/googleapis),\n\x20[Cloud\x20Endpoints](https://cloud.google.co\ + m/endpoints),\x20[gRPC\n\x20Gateway](https://github.com/grpc-ecosystem/g\ + rpc-gateway),\n\x20and\x20[Envoy](https://github.com/envoyproxy/envoy)\ + \x20proxy\x20support\x20this\x20feature\n\x20and\x20use\x20it\x20for\x20\ + large\x20scale\x20production\x20services.\n\n\x20`HttpRule`\x20defines\ + \x20the\x20schema\x20of\x20the\x20gRPC/REST\x20mapping.\x20The\x20mappin\ + g\x20specifies\n\x20how\x20different\x20portions\x20of\x20the\x20gRPC\ \x20request\x20message\x20are\x20mapped\x20to\x20the\x20URL\n\x20path,\ \x20URL\x20query\x20parameters,\x20and\x20HTTP\x20request\x20body.\x20It\ \x20also\x20controls\x20how\x20the\n\x20gRPC\x20response\x20message\x20i\ @@ -1240,77 +1052,76 @@ static file_descriptor_proto_data: &'static [u8] = b"\ essage\x20Message\x20{\n\x20\x20\x20\x20\x20\x20\x20string\x20text\x20=\ \x201;\x20//\x20The\x20resource\x20content.\n\x20\x20\x20\x20\x20}\n\n\ \x20This\x20enables\x20an\x20HTTP\x20REST\x20to\x20gRPC\x20mapping\x20as\ - \x20below:\n\n\x20HTTP\x20|\x20gRPC\n\x20-----|-----\n\x20`GET\x20/v1/me\ - ssages/123456`\x20\x20|\x20`GetMessage(name:\x20\"messages/123456\")`\n\ - \n\x20Any\x20fields\x20in\x20the\x20request\x20message\x20which\x20are\ - \x20not\x20bound\x20by\x20the\x20path\x20template\n\x20automatically\x20\ - become\x20HTTP\x20query\x20parameters\x20if\x20there\x20is\x20no\x20HTTP\ - \x20request\x20body.\n\x20For\x20example:\n\n\x20\x20\x20\x20\x20service\ - \x20Messaging\x20{\n\x20\x20\x20\x20\x20\x20\x20rpc\x20GetMessage(GetMes\ - sageRequest)\x20returns\x20(Message)\x20{\n\x20\x20\x20\x20\x20\x20\x20\ - \x20\x20option\x20(google.api.http)\x20=\x20{\n\x20\x20\x20\x20\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20get:\"/v1/messages/{message_id}\"\n\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20};\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\ - \x20\x20\x20}\n\x20\x20\x20\x20\x20message\x20GetMessageRequest\x20{\n\ - \x20\x20\x20\x20\x20\x20\x20message\x20SubMessage\x20{\n\x20\x20\x20\x20\ - \x20\x20\x20\x20\x20string\x20subfield\x20=\x201;\n\x20\x20\x20\x20\x20\ - \x20\x20}\n\x20\x20\x20\x20\x20\x20\x20string\x20message_id\x20=\x201;\ - \x20//\x20Mapped\x20to\x20URL\x20path.\n\x20\x20\x20\x20\x20\x20\x20int6\ - 4\x20revision\x20=\x202;\x20\x20\x20\x20//\x20Mapped\x20to\x20URL\x20que\ - ry\x20parameter\x20`revision`.\n\x20\x20\x20\x20\x20\x20\x20SubMessage\ - \x20sub\x20=\x203;\x20\x20\x20\x20//\x20Mapped\x20to\x20URL\x20query\x20\ - parameter\x20`sub.subfield`.\n\x20\x20\x20\x20\x20}\n\n\x20This\x20enabl\ - es\x20a\x20HTTP\x20JSON\x20to\x20RPC\x20mapping\x20as\x20below:\n\n\x20H\ - TTP\x20|\x20gRPC\n\x20-----|-----\n\x20`GET\x20/v1/messages/123456?revis\ - ion=2&sub.subfield=foo`\x20|\n\x20`GetMessage(message_id:\x20\"123456\"\ - \x20revision:\x202\x20sub:\x20SubMessage(subfield:\n\x20\"foo\"))`\n\n\ - \x20Note\x20that\x20fields\x20which\x20are\x20mapped\x20to\x20URL\x20que\ - ry\x20parameters\x20must\x20have\x20a\n\x20primitive\x20type\x20or\x20a\ - \x20repeated\x20primitive\x20type\x20or\x20a\x20non-repeated\x20message\ - \x20type.\n\x20In\x20the\x20case\x20of\x20a\x20repeated\x20type,\x20the\ - \x20parameter\x20can\x20be\x20repeated\x20in\x20the\x20URL\n\x20as\x20`.\ - ..?param=A¶m=B`.\x20In\x20the\x20case\x20of\x20a\x20message\x20type,\ - \x20each\x20field\x20of\x20the\n\x20message\x20is\x20mapped\x20to\x20a\ - \x20separate\x20parameter,\x20such\x20as\n\x20`...?foo.a=A&foo.b=B&foo.c\ - =C`.\n\n\x20For\x20HTTP\x20methods\x20that\x20allow\x20a\x20request\x20b\ - ody,\x20the\x20`body`\x20field\n\x20specifies\x20the\x20mapping.\x20Cons\ - ider\x20a\x20REST\x20update\x20method\x20on\x20the\n\x20message\x20resou\ - rce\x20collection:\n\n\x20\x20\x20\x20\x20service\x20Messaging\x20{\n\ - \x20\x20\x20\x20\x20\x20\x20rpc\x20UpdateMessage(UpdateMessageRequest)\ - \x20returns\x20(Message)\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20optio\ - n\x20(google.api.http)\x20=\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\ - \x20\x20patch:\x20\"/v1/messages/{message_id}\"\n\x20\x20\x20\x20\x20\ - \x20\x20\x20\x20\x20\x20body:\x20\"message\"\n\x20\x20\x20\x20\x20\x20\ - \x20\x20\x20};\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\ - \x20\x20\x20\x20\x20message\x20UpdateMessageRequest\x20{\n\x20\x20\x20\ - \x20\x20\x20\x20string\x20message_id\x20=\x201;\x20//\x20mapped\x20to\ - \x20the\x20URL\n\x20\x20\x20\x20\x20\x20\x20Message\x20message\x20=\x202\ - ;\x20\x20\x20//\x20mapped\x20to\x20the\x20body\n\x20\x20\x20\x20\x20}\n\ - \n\x20The\x20following\x20HTTP\x20JSON\x20to\x20RPC\x20mapping\x20is\x20\ - enabled,\x20where\x20the\n\x20representation\x20of\x20the\x20JSON\x20in\ - \x20the\x20request\x20body\x20is\x20determined\x20by\n\x20protos\x20JSON\ - \x20encoding:\n\n\x20HTTP\x20|\x20gRPC\n\x20-----|-----\n\x20`PATCH\x20/\ - v1/messages/123456\x20{\x20\"text\":\x20\"Hi!\"\x20}`\x20|\x20`UpdateMes\ - sage(message_id:\n\x20\"123456\"\x20message\x20{\x20text:\x20\"Hi!\"\x20\ - })`\n\n\x20The\x20special\x20name\x20`*`\x20can\x20be\x20used\x20in\x20t\ - he\x20body\x20mapping\x20to\x20define\x20that\n\x20every\x20field\x20not\ - \x20bound\x20by\x20the\x20path\x20template\x20should\x20be\x20mapped\x20\ - to\x20the\n\x20request\x20body.\x20\x20This\x20enables\x20the\x20followi\ - ng\x20alternative\x20definition\x20of\n\x20the\x20update\x20method:\n\n\ - \x20\x20\x20\x20\x20service\x20Messaging\x20{\n\x20\x20\x20\x20\x20\x20\ - \x20rpc\x20UpdateMessage(Message)\x20returns\x20(Message)\x20{\n\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20option\x20(google.api.http)\x20=\x20{\n\x20\ - \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20patch:\x20\"/v1/messages/{messag\ - e_id}\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body:\x20\"*\"\n\ - \x20\x20\x20\x20\x20\x20\x20\x20\x20};\n\x20\x20\x20\x20\x20\x20\x20}\n\ - \x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20message\x20Message\x20{\n\x20\ - \x20\x20\x20\x20\x20\x20string\x20message_id\x20=\x201;\n\x20\x20\x20\ - \x20\x20\x20\x20string\x20text\x20=\x202;\n\x20\x20\x20\x20\x20}\n\n\n\ - \x20The\x20following\x20HTTP\x20JSON\x20to\x20RPC\x20mapping\x20is\x20en\ - abled:\n\n\x20HTTP\x20|\x20gRPC\n\x20-----|-----\n\x20`PATCH\x20/v1/mess\ - ages/123456\x20{\x20\"text\":\x20\"Hi!\"\x20}`\x20|\x20`UpdateMessage(me\ - ssage_id:\n\x20\"123456\"\x20text:\x20\"Hi!\")`\n\n\x20Note\x20that\x20w\ - hen\x20using\x20`*`\x20in\x20the\x20body\x20mapping,\x20it\x20is\x20not\ + \x20below:\n\n\x20-\x20HTTP:\x20`GET\x20/v1/messages/123456`\n\x20-\x20g\ + RPC:\x20`GetMessage(name:\x20\"messages/123456\")`\n\n\x20Any\x20fields\ + \x20in\x20the\x20request\x20message\x20which\x20are\x20not\x20bound\x20b\ + y\x20the\x20path\x20template\n\x20automatically\x20become\x20HTTP\x20que\ + ry\x20parameters\x20if\x20there\x20is\x20no\x20HTTP\x20request\x20body.\ + \n\x20For\x20example:\n\n\x20\x20\x20\x20\x20service\x20Messaging\x20{\n\ + \x20\x20\x20\x20\x20\x20\x20rpc\x20GetMessage(GetMessageRequest)\x20retu\ + rns\x20(Message)\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20option\x20(go\ + ogle.api.http)\x20=\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\ + \x20\x20get:\"/v1/messages/{message_id}\"\n\x20\x20\x20\x20\x20\x20\x20\ + \x20\x20};\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\x20\ + \x20\x20\x20\x20message\x20GetMessageRequest\x20{\n\x20\x20\x20\x20\x20\ + \x20\x20message\x20SubMessage\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\ + string\x20subfield\x20=\x201;\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\ + \x20\x20\x20\x20\x20string\x20message_id\x20=\x201;\x20//\x20Mapped\x20t\ + o\x20URL\x20path.\n\x20\x20\x20\x20\x20\x20\x20int64\x20revision\x20=\ + \x202;\x20\x20\x20\x20//\x20Mapped\x20to\x20URL\x20query\x20parameter\ + \x20`revision`.\n\x20\x20\x20\x20\x20\x20\x20SubMessage\x20sub\x20=\x203\ + ;\x20\x20\x20\x20//\x20Mapped\x20to\x20URL\x20query\x20parameter\x20`sub\ + .subfield`.\n\x20\x20\x20\x20\x20}\n\n\x20This\x20enables\x20a\x20HTTP\ + \x20JSON\x20to\x20RPC\x20mapping\x20as\x20below:\n\n\x20-\x20HTTP:\x20`G\ + ET\x20/v1/messages/123456?revision=2&sub.subfield=foo`\n\x20-\x20gRPC:\ + \x20`GetMessage(message_id:\x20\"123456\"\x20revision:\x202\x20sub:\n\ + \x20SubMessage(subfield:\x20\"foo\"))`\n\n\x20Note\x20that\x20fields\x20\ + which\x20are\x20mapped\x20to\x20URL\x20query\x20parameters\x20must\x20ha\ + ve\x20a\n\x20primitive\x20type\x20or\x20a\x20repeated\x20primitive\x20ty\ + pe\x20or\x20a\x20non-repeated\x20message\x20type.\n\x20In\x20the\x20case\ + \x20of\x20a\x20repeated\x20type,\x20the\x20parameter\x20can\x20be\x20rep\ + eated\x20in\x20the\x20URL\n\x20as\x20`...?param=A¶m=B`.\x20In\x20the\ + \x20case\x20of\x20a\x20message\x20type,\x20each\x20field\x20of\x20the\n\ + \x20message\x20is\x20mapped\x20to\x20a\x20separate\x20parameter,\x20such\ + \x20as\n\x20`...?foo.a=A&foo.b=B&foo.c=C`.\n\n\x20For\x20HTTP\x20methods\ + \x20that\x20allow\x20a\x20request\x20body,\x20the\x20`body`\x20field\n\ + \x20specifies\x20the\x20mapping.\x20Consider\x20a\x20REST\x20update\x20m\ + ethod\x20on\x20the\n\x20message\x20resource\x20collection:\n\n\x20\x20\ + \x20\x20\x20service\x20Messaging\x20{\n\x20\x20\x20\x20\x20\x20\x20rpc\ + \x20UpdateMessage(UpdateMessageRequest)\x20returns\x20(Message)\x20{\n\ + \x20\x20\x20\x20\x20\x20\x20\x20\x20option\x20(google.api.http)\x20=\x20\ + {\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20patch:\x20\"/v1/messages/\ + {message_id}\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body:\x20\"m\ + essage\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20};\n\x20\x20\x20\x20\x20\ + \x20\x20}\n\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20message\x20UpdateM\ + essageRequest\x20{\n\x20\x20\x20\x20\x20\x20\x20string\x20message_id\x20\ + =\x201;\x20//\x20mapped\x20to\x20the\x20URL\n\x20\x20\x20\x20\x20\x20\ + \x20Message\x20message\x20=\x202;\x20\x20\x20//\x20mapped\x20to\x20the\ + \x20body\n\x20\x20\x20\x20\x20}\n\n\x20The\x20following\x20HTTP\x20JSON\ + \x20to\x20RPC\x20mapping\x20is\x20enabled,\x20where\x20the\n\x20represen\ + tation\x20of\x20the\x20JSON\x20in\x20the\x20request\x20body\x20is\x20det\ + ermined\x20by\n\x20protos\x20JSON\x20encoding:\n\n\x20-\x20HTTP:\x20`PAT\ + CH\x20/v1/messages/123456\x20{\x20\"text\":\x20\"Hi!\"\x20}`\n\x20-\x20g\ + RPC:\x20`UpdateMessage(message_id:\x20\"123456\"\x20message\x20{\x20text\ + :\x20\"Hi!\"\x20})`\n\n\x20The\x20special\x20name\x20`*`\x20can\x20be\ + \x20used\x20in\x20the\x20body\x20mapping\x20to\x20define\x20that\n\x20ev\ + ery\x20field\x20not\x20bound\x20by\x20the\x20path\x20template\x20should\ + \x20be\x20mapped\x20to\x20the\n\x20request\x20body.\x20\x20This\x20enabl\ + es\x20the\x20following\x20alternative\x20definition\x20of\n\x20the\x20up\ + date\x20method:\n\n\x20\x20\x20\x20\x20service\x20Messaging\x20{\n\x20\ + \x20\x20\x20\x20\x20\x20rpc\x20UpdateMessage(Message)\x20returns\x20(Mes\ + sage)\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20option\x20(google.api.ht\ + tp)\x20=\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20patch:\x20\"/\ + v1/messages/{message_id}\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\ + body:\x20\"*\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20};\n\x20\x20\x20\x20\ + \x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20message\x20Mes\ + sage\x20{\n\x20\x20\x20\x20\x20\x20\x20string\x20message_id\x20=\x201;\n\ + \x20\x20\x20\x20\x20\x20\x20string\x20text\x20=\x202;\n\x20\x20\x20\x20\ + \x20}\n\n\n\x20The\x20following\x20HTTP\x20JSON\x20to\x20RPC\x20mapping\ + \x20is\x20enabled:\n\n\x20-\x20HTTP:\x20`PATCH\x20/v1/messages/123456\ + \x20{\x20\"text\":\x20\"Hi!\"\x20}`\n\x20-\x20gRPC:\x20`UpdateMessage(me\ + ssage_id:\x20\"123456\"\x20text:\x20\"Hi!\")`\n\n\x20Note\x20that\x20whe\ + n\x20using\x20`*`\x20in\x20the\x20body\x20mapping,\x20it\x20is\x20not\ \x20possible\x20to\n\x20have\x20HTTP\x20parameters,\x20as\x20all\x20fiel\ ds\x20not\x20bound\x20by\x20the\x20path\x20end\x20in\n\x20the\x20body.\ \x20This\x20makes\x20this\x20option\x20more\x20rarely\x20used\x20in\x20p\ @@ -1332,12 +1143,12 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20\x20\x20string\x20message_id\x20=\x201;\n\x20\x20\x20\x20\x20\x20\ \x20string\x20user_id\x20=\x202;\n\x20\x20\x20\x20\x20}\n\n\x20This\x20e\ nables\x20the\x20following\x20two\x20alternative\x20HTTP\x20JSON\x20to\ - \x20RPC\x20mappings:\n\n\x20HTTP\x20|\x20gRPC\n\x20-----|-----\n\x20`GET\ - \x20/v1/messages/123456`\x20|\x20`GetMessage(message_id:\x20\"123456\")`\ - \n\x20`GET\x20/v1/users/me/messages/123456`\x20|\x20`GetMessage(user_id:\ - \x20\"me\"\x20message_id:\n\x20\"123456\")`\n\n\x20##\x20Rules\x20for\ - \x20HTTP\x20mapping\n\n\x201.\x20Leaf\x20request\x20fields\x20(recursive\ - \x20expansion\x20nested\x20messages\x20in\x20the\x20request\n\x20\x20\ + \x20RPC\x20mappings:\n\n\x20-\x20HTTP:\x20`GET\x20/v1/messages/123456`\n\ + \x20-\x20gRPC:\x20`GetMessage(message_id:\x20\"123456\")`\n\n\x20-\x20HT\ + TP:\x20`GET\x20/v1/users/me/messages/123456`\n\x20-\x20gRPC:\x20`GetMess\ + age(user_id:\x20\"me\"\x20message_id:\x20\"123456\")`\n\n\x20Rules\x20fo\ + r\x20HTTP\x20mapping\n\n\x201.\x20Leaf\x20request\x20fields\x20(recursiv\ + e\x20expansion\x20nested\x20messages\x20in\x20the\x20request\n\x20\x20\ \x20\x20message)\x20are\x20classified\x20into\x20three\x20categories:\n\ \x20\x20\x20\x20-\x20Fields\x20referred\x20by\x20the\x20path\x20template\ .\x20They\x20are\x20passed\x20via\x20the\x20URL\x20path.\n\x20\x20\x20\ @@ -1356,183 +1167,201 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20[HttpRule.body][google.api.HttpRule.body]\x20is\x20omitted,\x20there\ \x20is\x20no\x20HTTP\n\x20\x20request\x20body,\x20all\n\x20\x20\x20\x20\ \x20fields\x20are\x20passed\x20via\x20URL\x20path\x20and\x20URL\x20query\ - \x20parameters.\n\n\x20###\x20Path\x20template\x20syntax\n\n\x20\x20\x20\ - \x20\x20Template\x20=\x20\"/\"\x20Segments\x20[\x20Verb\x20]\x20;\n\x20\ - \x20\x20\x20\x20Segments\x20=\x20Segment\x20{\x20\"/\"\x20Segment\x20}\ - \x20;\n\x20\x20\x20\x20\x20Segment\x20\x20=\x20\"*\"\x20|\x20\"**\"\x20|\ - \x20LITERAL\x20|\x20Variable\x20;\n\x20\x20\x20\x20\x20Variable\x20=\x20\ - \"{\"\x20FieldPath\x20[\x20\"=\"\x20Segments\x20]\x20\"}\"\x20;\n\x20\ - \x20\x20\x20\x20FieldPath\x20=\x20IDENT\x20{\x20\".\"\x20IDENT\x20}\x20;\ - \n\x20\x20\x20\x20\x20Verb\x20\x20\x20\x20\x20=\x20\":\"\x20LITERAL\x20;\ - \n\n\x20The\x20syntax\x20`*`\x20matches\x20a\x20single\x20URL\x20path\ - \x20segment.\x20The\x20syntax\x20`**`\x20matches\n\x20zero\x20or\x20more\ - \x20URL\x20path\x20segments,\x20which\x20must\x20be\x20the\x20last\x20pa\ - rt\x20of\x20the\x20URL\x20path\n\x20except\x20the\x20`Verb`.\n\n\x20The\ - \x20syntax\x20`Variable`\x20matches\x20part\x20of\x20the\x20URL\x20path\ - \x20as\x20specified\x20by\x20its\n\x20template.\x20A\x20variable\x20temp\ - late\x20must\x20not\x20contain\x20other\x20variables.\x20If\x20a\x20vari\ - able\n\x20matches\x20a\x20single\x20path\x20segment,\x20its\x20template\ - \x20may\x20be\x20omitted,\x20e.g.\x20`{var}`\n\x20is\x20equivalent\x20to\ - \x20`{var=*}`.\n\n\x20The\x20syntax\x20`LITERAL`\x20matches\x20literal\ - \x20text\x20in\x20the\x20URL\x20path.\x20If\x20the\x20`LITERAL`\n\x20con\ - tains\x20any\x20reserved\x20character,\x20such\x20characters\x20should\ - \x20be\x20percent-encoded\n\x20before\x20the\x20matching.\n\n\x20If\x20a\ - \x20variable\x20contains\x20exactly\x20one\x20path\x20segment,\x20such\ - \x20as\x20`\"{var}\"`\x20or\n\x20`\"{var=*}\"`,\x20when\x20such\x20a\x20\ - variable\x20is\x20expanded\x20into\x20a\x20URL\x20path\x20on\x20the\x20c\ - lient\n\x20side,\x20all\x20characters\x20except\x20`[-_.~0-9a-zA-Z]`\x20\ - are\x20percent-encoded.\x20The\n\x20server\x20side\x20does\x20the\x20rev\ - erse\x20decoding.\x20Such\x20variables\x20show\x20up\x20in\x20the\n\x20[\ - Discovery\n\x20Document](https://developers.google.com/discovery/v1/refe\ - rence/apis)\x20as\n\x20`{var}`.\n\n\x20If\x20a\x20variable\x20contains\ - \x20multiple\x20path\x20segments,\x20such\x20as\x20`\"{var=foo/*}\"`\n\ - \x20or\x20`\"{var=**}\"`,\x20when\x20such\x20a\x20variable\x20is\x20expa\ - nded\x20into\x20a\x20URL\x20path\x20on\x20the\n\x20client\x20side,\x20al\ - l\x20characters\x20except\x20`[-_.~/0-9a-zA-Z]`\x20are\x20percent-encode\ - d.\n\x20The\x20server\x20side\x20does\x20the\x20reverse\x20decoding,\x20\ - except\x20\"%2F\"\x20and\x20\"%2f\"\x20are\x20left\n\x20unchanged.\x20Su\ - ch\x20variables\x20show\x20up\x20in\x20the\n\x20[Discovery\n\x20Document\ - ](https://developers.google.com/discovery/v1/reference/apis)\x20as\n\x20\ - `{+var}`.\n\n\x20##\x20Using\x20gRPC\x20API\x20Service\x20Configuration\ - \n\n\x20gRPC\x20API\x20Service\x20Configuration\x20(service\x20config)\ - \x20is\x20a\x20configuration\x20language\n\x20for\x20configuring\x20a\ - \x20gRPC\x20service\x20to\x20become\x20a\x20user-facing\x20product.\x20T\ - he\n\x20service\x20config\x20is\x20simply\x20the\x20YAML\x20representati\ - on\x20of\x20the\x20`google.api.Service`\n\x20proto\x20message.\n\n\x20As\ - \x20an\x20alternative\x20to\x20annotating\x20your\x20proto\x20file,\x20y\ - ou\x20can\x20configure\x20gRPC\n\x20transcoding\x20in\x20your\x20service\ - \x20config\x20YAML\x20files.\x20You\x20do\x20this\x20by\x20specifying\ - \x20a\n\x20`HttpRule`\x20that\x20maps\x20the\x20gRPC\x20method\x20to\x20\ - a\x20REST\x20endpoint,\x20achieving\x20the\x20same\n\x20effect\x20as\x20\ - the\x20proto\x20annotation.\x20This\x20can\x20be\x20particularly\x20usef\ - ul\x20if\x20you\n\x20have\x20a\x20proto\x20that\x20is\x20reused\x20in\ - \x20multiple\x20services.\x20Note\x20that\x20any\x20transcoding\n\x20spe\ - cified\x20in\x20the\x20service\x20config\x20will\x20override\x20any\x20m\ - atching\x20transcoding\n\x20configuration\x20in\x20the\x20proto.\n\n\x20\ - Example:\n\n\x20\x20\x20\x20\x20http:\n\x20\x20\x20\x20\x20\x20\x20rules\ - :\n\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Selects\x20a\x20gRPC\x20meth\ - od\x20and\x20applies\x20HttpRule\x20to\x20it.\n\x20\x20\x20\x20\x20\x20\ - \x20\x20\x20-\x20selector:\x20example.v1.Messaging.GetMessage\n\x20\x20\ - \x20\x20\x20\x20\x20\x20\x20\x20\x20get:\x20/v1/messages/{message_id}/{s\ - ub.subfield}\n\n\x20##\x20Special\x20notes\n\n\x20When\x20gRPC\x20Transc\ - oding\x20is\x20used\x20to\x20map\x20a\x20gRPC\x20to\x20JSON\x20REST\x20e\ - ndpoints,\x20the\n\x20proto\x20to\x20JSON\x20conversion\x20must\x20follo\ - w\x20the\x20[proto3\n\x20specification](https://developers.google.com/pr\ - otocol-buffers/docs/proto3#json).\n\n\x20While\x20the\x20single\x20segme\ - nt\x20variable\x20follows\x20the\x20semantics\x20of\n\x20[RFC\x206570](h\ - ttps://tools.ietf.org/html/rfc6570)\x20Section\x203.2.2\x20Simple\x20Str\ - ing\n\x20Expansion,\x20the\x20multi\x20segment\x20variable\x20**does\x20\ - not**\x20follow\x20RFC\x206570\x20Section\n\x203.2.3\x20Reserved\x20Expa\ - nsion.\x20The\x20reason\x20is\x20that\x20the\x20Reserved\x20Expansion\n\ - \x20does\x20not\x20expand\x20special\x20characters\x20like\x20`?`\x20and\ - \x20`#`,\x20which\x20would\x20lead\n\x20to\x20invalid\x20URLs.\x20As\x20\ - the\x20result,\x20gRPC\x20Transcoding\x20uses\x20a\x20custom\x20encoding\ - \n\x20for\x20multi\x20segment\x20variables.\n\n\x20The\x20path\x20variab\ - les\x20**must\x20not**\x20refer\x20to\x20any\x20repeated\x20or\x20mapped\ - \x20field,\n\x20because\x20client\x20libraries\x20are\x20not\x20capable\ - \x20of\x20handling\x20such\x20variable\x20expansion.\n\n\x20The\x20path\ - \x20variables\x20**must\x20not**\x20capture\x20the\x20leading\x20\"/\"\ - \x20character.\x20The\x20reason\n\x20is\x20that\x20the\x20most\x20common\ - \x20use\x20case\x20\"{var}\"\x20does\x20not\x20capture\x20the\x20leading\ - \x20\"/\"\n\x20character.\x20For\x20consistency,\x20all\x20path\x20varia\ - bles\x20must\x20share\x20the\x20same\x20behavior.\n\n\x20Repeated\x20mes\ - sage\x20fields\x20must\x20not\x20be\x20mapped\x20to\x20URL\x20query\x20p\ - arameters,\x20because\n\x20no\x20client\x20library\x20can\x20support\x20\ - such\x20complicated\x20mapping.\n\n\x20If\x20an\x20API\x20needs\x20to\ - \x20use\x20a\x20JSON\x20array\x20for\x20request\x20or\x20response\x20bod\ - y,\x20it\x20can\x20map\n\x20the\x20request\x20or\x20response\x20body\x20\ - to\x20a\x20repeated\x20field.\x20However,\x20some\x20gRPC\n\x20Transcodi\ - ng\x20implementations\x20may\x20not\x20support\x20this\x20feature.\n\n\ - \x0b\n\x03\x04\x01\x01\x12\x04\xbb\x02\x08\x10\n\x8f\x01\n\x04\x04\x01\ - \x02\0\x12\x04\xc0\x02\x02\x16\x1a\x80\x01\x20Selects\x20a\x20method\x20\ - to\x20which\x20this\x20rule\x20applies.\n\n\x20Refer\x20to\x20[selector]\ - [google.api.DocumentationRule.selector]\x20for\x20syntax\n\x20details.\n\ - \n\r\n\x05\x04\x01\x02\0\x05\x12\x04\xc0\x02\x02\x08\n\r\n\x05\x04\x01\ - \x02\0\x01\x12\x04\xc0\x02\t\x11\n\r\n\x05\x04\x01\x02\0\x03\x12\x04\xc0\ - \x02\x14\x15\n\xd0\x01\n\x04\x04\x01\x08\0\x12\x06\xc5\x02\x02\xdb\x02\ - \x03\x1a\xbf\x01\x20Determines\x20the\x20URL\x20pattern\x20is\x20matched\ - \x20by\x20this\x20rules.\x20This\x20pattern\x20can\x20be\n\x20used\x20wi\ - th\x20any\x20of\x20the\x20{get|put|post|delete|patch}\x20methods.\x20A\ - \x20custom\x20method\n\x20can\x20be\x20defined\x20using\x20the\x20'custo\ - m'\x20field.\n\n\r\n\x05\x04\x01\x08\0\x01\x12\x04\xc5\x02\x08\x0f\n\\\n\ - \x04\x04\x01\x02\x01\x12\x04\xc8\x02\x04\x13\x1aN\x20Maps\x20to\x20HTTP\ - \x20GET.\x20Used\x20for\x20listing\x20and\x20getting\x20information\x20a\ - bout\n\x20resources.\n\n\r\n\x05\x04\x01\x02\x01\x05\x12\x04\xc8\x02\x04\ - \n\n\r\n\x05\x04\x01\x02\x01\x01\x12\x04\xc8\x02\x0b\x0e\n\r\n\x05\x04\ - \x01\x02\x01\x03\x12\x04\xc8\x02\x11\x12\n@\n\x04\x04\x01\x02\x02\x12\ - \x04\xcb\x02\x04\x13\x1a2\x20Maps\x20to\x20HTTP\x20PUT.\x20Used\x20for\ - \x20replacing\x20a\x20resource.\n\n\r\n\x05\x04\x01\x02\x02\x05\x12\x04\ - \xcb\x02\x04\n\n\r\n\x05\x04\x01\x02\x02\x01\x12\x04\xcb\x02\x0b\x0e\n\r\ - \n\x05\x04\x01\x02\x02\x03\x12\x04\xcb\x02\x11\x12\nX\n\x04\x04\x01\x02\ - \x03\x12\x04\xce\x02\x04\x14\x1aJ\x20Maps\x20to\x20HTTP\x20POST.\x20Used\ - \x20for\x20creating\x20a\x20resource\x20or\x20performing\x20an\x20action\ - .\n\n\r\n\x05\x04\x01\x02\x03\x05\x12\x04\xce\x02\x04\n\n\r\n\x05\x04\ - \x01\x02\x03\x01\x12\x04\xce\x02\x0b\x0f\n\r\n\x05\x04\x01\x02\x03\x03\ - \x12\x04\xce\x02\x12\x13\nB\n\x04\x04\x01\x02\x04\x12\x04\xd1\x02\x04\ - \x16\x1a4\x20Maps\x20to\x20HTTP\x20DELETE.\x20Used\x20for\x20deleting\ - \x20a\x20resource.\n\n\r\n\x05\x04\x01\x02\x04\x05\x12\x04\xd1\x02\x04\n\ - \n\r\n\x05\x04\x01\x02\x04\x01\x12\x04\xd1\x02\x0b\x11\n\r\n\x05\x04\x01\ - \x02\x04\x03\x12\x04\xd1\x02\x14\x15\nA\n\x04\x04\x01\x02\x05\x12\x04\ - \xd4\x02\x04\x15\x1a3\x20Maps\x20to\x20HTTP\x20PATCH.\x20Used\x20for\x20\ - updating\x20a\x20resource.\n\n\r\n\x05\x04\x01\x02\x05\x05\x12\x04\xd4\ - \x02\x04\n\n\r\n\x05\x04\x01\x02\x05\x01\x12\x04\xd4\x02\x0b\x10\n\r\n\ - \x05\x04\x01\x02\x05\x03\x12\x04\xd4\x02\x13\x14\n\x98\x02\n\x04\x04\x01\ - \x02\x06\x12\x04\xda\x02\x04!\x1a\x89\x02\x20The\x20custom\x20pattern\ - \x20is\x20used\x20for\x20specifying\x20an\x20HTTP\x20method\x20that\x20i\ - s\x20not\n\x20included\x20in\x20the\x20`pattern`\x20field,\x20such\x20as\ - \x20HEAD,\x20or\x20\"*\"\x20to\x20leave\x20the\n\x20HTTP\x20method\x20un\ - specified\x20for\x20this\x20rule.\x20The\x20wild-card\x20rule\x20is\x20u\ - seful\n\x20for\x20services\x20that\x20provide\x20content\x20to\x20Web\ - \x20(HTML)\x20clients.\n\n\r\n\x05\x04\x01\x02\x06\x06\x12\x04\xda\x02\ - \x04\x15\n\r\n\x05\x04\x01\x02\x06\x01\x12\x04\xda\x02\x16\x1c\n\r\n\x05\ - \x04\x01\x02\x06\x03\x12\x04\xda\x02\x1f\x20\n\xc4\x02\n\x04\x04\x01\x02\ - \x07\x12\x04\xe3\x02\x02\x12\x1a\xb5\x02\x20The\x20name\x20of\x20the\x20\ - request\x20field\x20whose\x20value\x20is\x20mapped\x20to\x20the\x20HTTP\ - \x20request\n\x20body,\x20or\x20`*`\x20for\x20mapping\x20all\x20request\ - \x20fields\x20not\x20captured\x20by\x20the\x20path\n\x20pattern\x20to\ - \x20the\x20HTTP\x20body,\x20or\x20omitted\x20for\x20not\x20having\x20any\ - \x20HTTP\x20request\x20body.\n\n\x20NOTE:\x20the\x20referred\x20field\ - \x20must\x20be\x20present\x20at\x20the\x20top-level\x20of\x20the\x20requ\ - est\n\x20message\x20type.\n\n\r\n\x05\x04\x01\x02\x07\x05\x12\x04\xe3\ - \x02\x02\x08\n\r\n\x05\x04\x01\x02\x07\x01\x12\x04\xe3\x02\t\r\n\r\n\x05\ - \x04\x01\x02\x07\x03\x12\x04\xe3\x02\x10\x11\n\x99\x02\n\x04\x04\x01\x02\ - \x08\x12\x04\xeb\x02\x02\x1c\x1a\x8a\x02\x20Optional.\x20The\x20name\x20\ - of\x20the\x20response\x20field\x20whose\x20value\x20is\x20mapped\x20to\ - \x20the\x20HTTP\n\x20response\x20body.\x20When\x20omitted,\x20the\x20ent\ - ire\x20response\x20message\x20will\x20be\x20used\n\x20as\x20the\x20HTTP\ - \x20response\x20body.\n\n\x20NOTE:\x20The\x20referred\x20field\x20must\ - \x20be\x20present\x20at\x20the\x20top-level\x20of\x20the\x20response\n\ - \x20message\x20type.\n\n\r\n\x05\x04\x01\x02\x08\x05\x12\x04\xeb\x02\x02\ - \x08\n\r\n\x05\x04\x01\x02\x08\x01\x12\x04\xeb\x02\t\x16\n\r\n\x05\x04\ - \x01\x02\x08\x03\x12\x04\xeb\x02\x19\x1b\n\xbb\x01\n\x04\x04\x01\x02\t\ - \x12\x04\xf0\x02\x02-\x1a\xac\x01\x20Additional\x20HTTP\x20bindings\x20f\ - or\x20the\x20selector.\x20Nested\x20bindings\x20must\n\x20not\x20contain\ - \x20an\x20`additional_bindings`\x20field\x20themselves\x20(that\x20is,\n\ - \x20the\x20nesting\x20may\x20only\x20be\x20one\x20level\x20deep).\n\n\r\ - \n\x05\x04\x01\x02\t\x04\x12\x04\xf0\x02\x02\n\n\r\n\x05\x04\x01\x02\t\ - \x06\x12\x04\xf0\x02\x0b\x13\n\r\n\x05\x04\x01\x02\t\x01\x12\x04\xf0\x02\ - \x14'\n\r\n\x05\x04\x01\x02\t\x03\x12\x04\xf0\x02*,\nG\n\x02\x04\x02\x12\ - \x06\xf4\x02\0\xfa\x02\x01\x1a9\x20A\x20custom\x20pattern\x20is\x20used\ - \x20for\x20defining\x20custom\x20HTTP\x20verb.\n\n\x0b\n\x03\x04\x02\x01\ - \x12\x04\xf4\x02\x08\x19\n2\n\x04\x04\x02\x02\0\x12\x04\xf6\x02\x02\x12\ - \x1a$\x20The\x20name\x20of\x20this\x20custom\x20HTTP\x20verb.\n\n\r\n\ - \x05\x04\x02\x02\0\x05\x12\x04\xf6\x02\x02\x08\n\r\n\x05\x04\x02\x02\0\ - \x01\x12\x04\xf6\x02\t\r\n\r\n\x05\x04\x02\x02\0\x03\x12\x04\xf6\x02\x10\ - \x11\n5\n\x04\x04\x02\x02\x01\x12\x04\xf9\x02\x02\x12\x1a'\x20The\x20pat\ - h\x20matched\x20by\x20this\x20custom\x20verb.\n\n\r\n\x05\x04\x02\x02\ - \x01\x05\x12\x04\xf9\x02\x02\x08\n\r\n\x05\x04\x02\x02\x01\x01\x12\x04\ - \xf9\x02\t\r\n\r\n\x05\x04\x02\x02\x01\x03\x12\x04\xf9\x02\x10\x11b\x06p\ - roto3\ + \x20parameters.\n\n\x20Path\x20template\x20syntax\n\n\x20\x20\x20\x20\ + \x20Template\x20=\x20\"/\"\x20Segments\x20[\x20Verb\x20]\x20;\n\x20\x20\ + \x20\x20\x20Segments\x20=\x20Segment\x20{\x20\"/\"\x20Segment\x20}\x20;\ + \n\x20\x20\x20\x20\x20Segment\x20\x20=\x20\"*\"\x20|\x20\"**\"\x20|\x20L\ + ITERAL\x20|\x20Variable\x20;\n\x20\x20\x20\x20\x20Variable\x20=\x20\"{\"\ + \x20FieldPath\x20[\x20\"=\"\x20Segments\x20]\x20\"}\"\x20;\n\x20\x20\x20\ + \x20\x20FieldPath\x20=\x20IDENT\x20{\x20\".\"\x20IDENT\x20}\x20;\n\x20\ + \x20\x20\x20\x20Verb\x20\x20\x20\x20\x20=\x20\":\"\x20LITERAL\x20;\n\n\ + \x20The\x20syntax\x20`*`\x20matches\x20a\x20single\x20URL\x20path\x20seg\ + ment.\x20The\x20syntax\x20`**`\x20matches\n\x20zero\x20or\x20more\x20URL\ + \x20path\x20segments,\x20which\x20must\x20be\x20the\x20last\x20part\x20o\ + f\x20the\x20URL\x20path\n\x20except\x20the\x20`Verb`.\n\n\x20The\x20synt\ + ax\x20`Variable`\x20matches\x20part\x20of\x20the\x20URL\x20path\x20as\ + \x20specified\x20by\x20its\n\x20template.\x20A\x20variable\x20template\ + \x20must\x20not\x20contain\x20other\x20variables.\x20If\x20a\x20variable\ + \n\x20matches\x20a\x20single\x20path\x20segment,\x20its\x20template\x20m\ + ay\x20be\x20omitted,\x20e.g.\x20`{var}`\n\x20is\x20equivalent\x20to\x20`\ + {var=*}`.\n\n\x20The\x20syntax\x20`LITERAL`\x20matches\x20literal\x20tex\ + t\x20in\x20the\x20URL\x20path.\x20If\x20the\x20`LITERAL`\n\x20contains\ + \x20any\x20reserved\x20character,\x20such\x20characters\x20should\x20be\ + \x20percent-encoded\n\x20before\x20the\x20matching.\n\n\x20If\x20a\x20va\ + riable\x20contains\x20exactly\x20one\x20path\x20segment,\x20such\x20as\ + \x20`\"{var}\"`\x20or\n\x20`\"{var=*}\"`,\x20when\x20such\x20a\x20variab\ + le\x20is\x20expanded\x20into\x20a\x20URL\x20path\x20on\x20the\x20client\ + \n\x20side,\x20all\x20characters\x20except\x20`[-_.~0-9a-zA-Z]`\x20are\ + \x20percent-encoded.\x20The\n\x20server\x20side\x20does\x20the\x20revers\ + e\x20decoding.\x20Such\x20variables\x20show\x20up\x20in\x20the\n\x20[Dis\ + covery\n\x20Document](https://developers.google.com/discovery/v1/referen\ + ce/apis)\x20as\n\x20`{var}`.\n\n\x20If\x20a\x20variable\x20contains\x20m\ + ultiple\x20path\x20segments,\x20such\x20as\x20`\"{var=foo/*}\"`\n\x20or\ + \x20`\"{var=**}\"`,\x20when\x20such\x20a\x20variable\x20is\x20expanded\ + \x20into\x20a\x20URL\x20path\x20on\x20the\n\x20client\x20side,\x20all\ + \x20characters\x20except\x20`[-_.~/0-9a-zA-Z]`\x20are\x20percent-encoded\ + .\n\x20The\x20server\x20side\x20does\x20the\x20reverse\x20decoding,\x20e\ + xcept\x20\"%2F\"\x20and\x20\"%2f\"\x20are\x20left\n\x20unchanged.\x20Suc\ + h\x20variables\x20show\x20up\x20in\x20the\n\x20[Discovery\n\x20Document]\ + (https://developers.google.com/discovery/v1/reference/apis)\x20as\n\x20`\ + {+var}`.\n\n\x20Using\x20gRPC\x20API\x20Service\x20Configuration\n\n\x20\ + gRPC\x20API\x20Service\x20Configuration\x20(service\x20config)\x20is\x20\ + a\x20configuration\x20language\n\x20for\x20configuring\x20a\x20gRPC\x20s\ + ervice\x20to\x20become\x20a\x20user-facing\x20product.\x20The\n\x20servi\ + ce\x20config\x20is\x20simply\x20the\x20YAML\x20representation\x20of\x20t\ + he\x20`google.api.Service`\n\x20proto\x20message.\n\n\x20As\x20an\x20alt\ + ernative\x20to\x20annotating\x20your\x20proto\x20file,\x20you\x20can\x20\ + configure\x20gRPC\n\x20transcoding\x20in\x20your\x20service\x20config\ + \x20YAML\x20files.\x20You\x20do\x20this\x20by\x20specifying\x20a\n\x20`H\ + ttpRule`\x20that\x20maps\x20the\x20gRPC\x20method\x20to\x20a\x20REST\x20\ + endpoint,\x20achieving\x20the\x20same\n\x20effect\x20as\x20the\x20proto\ + \x20annotation.\x20This\x20can\x20be\x20particularly\x20useful\x20if\x20\ + you\n\x20have\x20a\x20proto\x20that\x20is\x20reused\x20in\x20multiple\ + \x20services.\x20Note\x20that\x20any\x20transcoding\n\x20specified\x20in\ + \x20the\x20service\x20config\x20will\x20override\x20any\x20matching\x20t\ + ranscoding\n\x20configuration\x20in\x20the\x20proto.\n\n\x20The\x20follo\ + wing\x20example\x20selects\x20a\x20gRPC\x20method\x20and\x20applies\x20a\ + n\x20`HttpRule`\x20to\x20it:\n\n\x20\x20\x20\x20\x20http:\n\x20\x20\x20\ + \x20\x20\x20\x20rules:\n\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20selecto\ + r:\x20example.v1.Messaging.GetMessage\n\x20\x20\x20\x20\x20\x20\x20\x20\ + \x20\x20\x20get:\x20/v1/messages/{message_id}/{sub.subfield}\n\n\x20Spec\ + ial\x20notes\n\n\x20When\x20gRPC\x20Transcoding\x20is\x20used\x20to\x20m\ + ap\x20a\x20gRPC\x20to\x20JSON\x20REST\x20endpoints,\x20the\n\x20proto\ + \x20to\x20JSON\x20conversion\x20must\x20follow\x20the\x20[proto3\n\x20sp\ + ecification](https://developers.google.com/protocol-buffers/docs/proto3#\ + json).\n\n\x20While\x20the\x20single\x20segment\x20variable\x20follows\ + \x20the\x20semantics\x20of\n\x20[RFC\x206570](https://tools.ietf.org/htm\ + l/rfc6570)\x20Section\x203.2.2\x20Simple\x20String\n\x20Expansion,\x20th\ + e\x20multi\x20segment\x20variable\x20**does\x20not**\x20follow\x20RFC\ + \x206570\x20Section\n\x203.2.3\x20Reserved\x20Expansion.\x20The\x20reaso\ + n\x20is\x20that\x20the\x20Reserved\x20Expansion\n\x20does\x20not\x20expa\ + nd\x20special\x20characters\x20like\x20`?`\x20and\x20`#`,\x20which\x20wo\ + uld\x20lead\n\x20to\x20invalid\x20URLs.\x20As\x20the\x20result,\x20gRPC\ + \x20Transcoding\x20uses\x20a\x20custom\x20encoding\n\x20for\x20multi\x20\ + segment\x20variables.\n\n\x20The\x20path\x20variables\x20**must\x20not**\ + \x20refer\x20to\x20any\x20repeated\x20or\x20mapped\x20field,\n\x20becaus\ + e\x20client\x20libraries\x20are\x20not\x20capable\x20of\x20handling\x20s\ + uch\x20variable\x20expansion.\n\n\x20The\x20path\x20variables\x20**must\ + \x20not**\x20capture\x20the\x20leading\x20\"/\"\x20character.\x20The\x20\ + reason\n\x20is\x20that\x20the\x20most\x20common\x20use\x20case\x20\"{var\ + }\"\x20does\x20not\x20capture\x20the\x20leading\x20\"/\"\n\x20character.\ + \x20For\x20consistency,\x20all\x20path\x20variables\x20must\x20share\x20\ + the\x20same\x20behavior.\n\n\x20Repeated\x20message\x20fields\x20must\ + \x20not\x20be\x20mapped\x20to\x20URL\x20query\x20parameters,\x20because\ + \n\x20no\x20client\x20library\x20can\x20support\x20such\x20complicated\ + \x20mapping.\n\n\x20If\x20an\x20API\x20needs\x20to\x20use\x20a\x20JSON\ + \x20array\x20for\x20request\x20or\x20response\x20body,\x20it\x20can\x20m\ + ap\n\x20the\x20request\x20or\x20response\x20body\x20to\x20a\x20repeated\ + \x20field.\x20However,\x20some\x20gRPC\n\x20Transcoding\x20implementatio\ + ns\x20may\x20not\x20support\x20this\x20feature.\n\n\x0b\n\x03\x04\x01\ + \x01\x12\x04\xb3\x02\x08\x10\n\x8f\x01\n\x04\x04\x01\x02\0\x12\x04\xb8\ + \x02\x02\x16\x1a\x80\x01\x20Selects\x20a\x20method\x20to\x20which\x20thi\ + s\x20rule\x20applies.\n\n\x20Refer\x20to\x20[selector][google.api.Docume\ + ntationRule.selector]\x20for\x20syntax\n\x20details.\n\n\r\n\x05\x04\x01\ + \x02\0\x05\x12\x04\xb8\x02\x02\x08\n\r\n\x05\x04\x01\x02\0\x01\x12\x04\ + \xb8\x02\t\x11\n\r\n\x05\x04\x01\x02\0\x03\x12\x04\xb8\x02\x14\x15\n\xd0\ + \x01\n\x04\x04\x01\x08\0\x12\x06\xbd\x02\x02\xd3\x02\x03\x1a\xbf\x01\x20\ + Determines\x20the\x20URL\x20pattern\x20is\x20matched\x20by\x20this\x20ru\ + les.\x20This\x20pattern\x20can\x20be\n\x20used\x20with\x20any\x20of\x20t\ + he\x20{get|put|post|delete|patch}\x20methods.\x20A\x20custom\x20method\n\ + \x20can\x20be\x20defined\x20using\x20the\x20'custom'\x20field.\n\n\r\n\ + \x05\x04\x01\x08\0\x01\x12\x04\xbd\x02\x08\x0f\n\\\n\x04\x04\x01\x02\x01\ + \x12\x04\xc0\x02\x04\x13\x1aN\x20Maps\x20to\x20HTTP\x20GET.\x20Used\x20f\ + or\x20listing\x20and\x20getting\x20information\x20about\n\x20resources.\ + \n\n\r\n\x05\x04\x01\x02\x01\x05\x12\x04\xc0\x02\x04\n\n\r\n\x05\x04\x01\ + \x02\x01\x01\x12\x04\xc0\x02\x0b\x0e\n\r\n\x05\x04\x01\x02\x01\x03\x12\ + \x04\xc0\x02\x11\x12\n@\n\x04\x04\x01\x02\x02\x12\x04\xc3\x02\x04\x13\ + \x1a2\x20Maps\x20to\x20HTTP\x20PUT.\x20Used\x20for\x20replacing\x20a\x20\ + resource.\n\n\r\n\x05\x04\x01\x02\x02\x05\x12\x04\xc3\x02\x04\n\n\r\n\ + \x05\x04\x01\x02\x02\x01\x12\x04\xc3\x02\x0b\x0e\n\r\n\x05\x04\x01\x02\ + \x02\x03\x12\x04\xc3\x02\x11\x12\nX\n\x04\x04\x01\x02\x03\x12\x04\xc6\ + \x02\x04\x14\x1aJ\x20Maps\x20to\x20HTTP\x20POST.\x20Used\x20for\x20creat\ + ing\x20a\x20resource\x20or\x20performing\x20an\x20action.\n\n\r\n\x05\ + \x04\x01\x02\x03\x05\x12\x04\xc6\x02\x04\n\n\r\n\x05\x04\x01\x02\x03\x01\ + \x12\x04\xc6\x02\x0b\x0f\n\r\n\x05\x04\x01\x02\x03\x03\x12\x04\xc6\x02\ + \x12\x13\nB\n\x04\x04\x01\x02\x04\x12\x04\xc9\x02\x04\x16\x1a4\x20Maps\ + \x20to\x20HTTP\x20DELETE.\x20Used\x20for\x20deleting\x20a\x20resource.\n\ + \n\r\n\x05\x04\x01\x02\x04\x05\x12\x04\xc9\x02\x04\n\n\r\n\x05\x04\x01\ + \x02\x04\x01\x12\x04\xc9\x02\x0b\x11\n\r\n\x05\x04\x01\x02\x04\x03\x12\ + \x04\xc9\x02\x14\x15\nA\n\x04\x04\x01\x02\x05\x12\x04\xcc\x02\x04\x15\ + \x1a3\x20Maps\x20to\x20HTTP\x20PATCH.\x20Used\x20for\x20updating\x20a\ + \x20resource.\n\n\r\n\x05\x04\x01\x02\x05\x05\x12\x04\xcc\x02\x04\n\n\r\ + \n\x05\x04\x01\x02\x05\x01\x12\x04\xcc\x02\x0b\x10\n\r\n\x05\x04\x01\x02\ + \x05\x03\x12\x04\xcc\x02\x13\x14\n\x98\x02\n\x04\x04\x01\x02\x06\x12\x04\ + \xd2\x02\x04!\x1a\x89\x02\x20The\x20custom\x20pattern\x20is\x20used\x20f\ + or\x20specifying\x20an\x20HTTP\x20method\x20that\x20is\x20not\n\x20inclu\ + ded\x20in\x20the\x20`pattern`\x20field,\x20such\x20as\x20HEAD,\x20or\x20\ + \"*\"\x20to\x20leave\x20the\n\x20HTTP\x20method\x20unspecified\x20for\ + \x20this\x20rule.\x20The\x20wild-card\x20rule\x20is\x20useful\n\x20for\ + \x20services\x20that\x20provide\x20content\x20to\x20Web\x20(HTML)\x20cli\ + ents.\n\n\r\n\x05\x04\x01\x02\x06\x06\x12\x04\xd2\x02\x04\x15\n\r\n\x05\ + \x04\x01\x02\x06\x01\x12\x04\xd2\x02\x16\x1c\n\r\n\x05\x04\x01\x02\x06\ + \x03\x12\x04\xd2\x02\x1f\x20\n\xc4\x02\n\x04\x04\x01\x02\x07\x12\x04\xdb\ + \x02\x02\x12\x1a\xb5\x02\x20The\x20name\x20of\x20the\x20request\x20field\ + \x20whose\x20value\x20is\x20mapped\x20to\x20the\x20HTTP\x20request\n\x20\ + body,\x20or\x20`*`\x20for\x20mapping\x20all\x20request\x20fields\x20not\ + \x20captured\x20by\x20the\x20path\n\x20pattern\x20to\x20the\x20HTTP\x20b\ + ody,\x20or\x20omitted\x20for\x20not\x20having\x20any\x20HTTP\x20request\ + \x20body.\n\n\x20NOTE:\x20the\x20referred\x20field\x20must\x20be\x20pres\ + ent\x20at\x20the\x20top-level\x20of\x20the\x20request\n\x20message\x20ty\ + pe.\n\n\r\n\x05\x04\x01\x02\x07\x05\x12\x04\xdb\x02\x02\x08\n\r\n\x05\ + \x04\x01\x02\x07\x01\x12\x04\xdb\x02\t\r\n\r\n\x05\x04\x01\x02\x07\x03\ + \x12\x04\xdb\x02\x10\x11\n\x99\x02\n\x04\x04\x01\x02\x08\x12\x04\xe3\x02\ + \x02\x1c\x1a\x8a\x02\x20Optional.\x20The\x20name\x20of\x20the\x20respons\ + e\x20field\x20whose\x20value\x20is\x20mapped\x20to\x20the\x20HTTP\n\x20r\ + esponse\x20body.\x20When\x20omitted,\x20the\x20entire\x20response\x20mes\ + sage\x20will\x20be\x20used\n\x20as\x20the\x20HTTP\x20response\x20body.\n\ + \n\x20NOTE:\x20The\x20referred\x20field\x20must\x20be\x20present\x20at\ + \x20the\x20top-level\x20of\x20the\x20response\n\x20message\x20type.\n\n\ + \r\n\x05\x04\x01\x02\x08\x05\x12\x04\xe3\x02\x02\x08\n\r\n\x05\x04\x01\ + \x02\x08\x01\x12\x04\xe3\x02\t\x16\n\r\n\x05\x04\x01\x02\x08\x03\x12\x04\ + \xe3\x02\x19\x1b\n\xbb\x01\n\x04\x04\x01\x02\t\x12\x04\xe8\x02\x02-\x1a\ + \xac\x01\x20Additional\x20HTTP\x20bindings\x20for\x20the\x20selector.\ + \x20Nested\x20bindings\x20must\n\x20not\x20contain\x20an\x20`additional_\ + bindings`\x20field\x20themselves\x20(that\x20is,\n\x20the\x20nesting\x20\ + may\x20only\x20be\x20one\x20level\x20deep).\n\n\r\n\x05\x04\x01\x02\t\ + \x04\x12\x04\xe8\x02\x02\n\n\r\n\x05\x04\x01\x02\t\x06\x12\x04\xe8\x02\ + \x0b\x13\n\r\n\x05\x04\x01\x02\t\x01\x12\x04\xe8\x02\x14'\n\r\n\x05\x04\ + \x01\x02\t\x03\x12\x04\xe8\x02*,\nG\n\x02\x04\x02\x12\x06\xec\x02\0\xf2\ + \x02\x01\x1a9\x20A\x20custom\x20pattern\x20is\x20used\x20for\x20defining\ + \x20custom\x20HTTP\x20verb.\n\n\x0b\n\x03\x04\x02\x01\x12\x04\xec\x02\ + \x08\x19\n2\n\x04\x04\x02\x02\0\x12\x04\xee\x02\x02\x12\x1a$\x20The\x20n\ + ame\x20of\x20this\x20custom\x20HTTP\x20verb.\n\n\r\n\x05\x04\x02\x02\0\ + \x05\x12\x04\xee\x02\x02\x08\n\r\n\x05\x04\x02\x02\0\x01\x12\x04\xee\x02\ + \t\r\n\r\n\x05\x04\x02\x02\0\x03\x12\x04\xee\x02\x10\x11\n5\n\x04\x04\ + \x02\x02\x01\x12\x04\xf1\x02\x02\x12\x1a'\x20The\x20path\x20matched\x20b\ + y\x20this\x20custom\x20verb.\n\n\r\n\x05\x04\x02\x02\x01\x05\x12\x04\xf1\ + \x02\x02\x08\n\r\n\x05\x04\x02\x02\x01\x01\x12\x04\xf1\x02\t\r\n\r\n\x05\ + \x04\x02\x02\x01\x03\x12\x04\xf1\x02\x10\x11b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(3); + messages.push(Http::generated_message_descriptor_data()); + messages.push(HttpRule::generated_message_descriptor_data()); + messages.push(CustomHttpPattern::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/httpbody.rs b/googleapis-raw/src/api/httpbody.rs index a643e85..a1a9bf3 100644 --- a/googleapis-raw/src/api/httpbody.rs +++ b/googleapis-raw/src/api/httpbody.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,30 +9,39 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/httpbody.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.HttpBody) +#[derive(PartialEq,Clone,Default,Debug)] pub struct HttpBody { // message fields + /// The HTTP Content-Type header value specifying the content type of the body. + // @@protoc_insertion_point(field:google.api.HttpBody.content_type) pub content_type: ::std::string::String, + /// The HTTP request/response body as raw binary. + // @@protoc_insertion_point(field:google.api.HttpBody.data) pub data: ::std::vec::Vec, - pub extensions: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>, + /// Application specific response metadata. Must be set in the first response + /// for streaming APIs. + // @@protoc_insertion_point(field:google.api.HttpBody.extensions) + pub extensions: ::std::vec::Vec<::protobuf::well_known_types::any::Any>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.HttpBody.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a HttpBody { @@ -45,109 +55,53 @@ impl HttpBody { ::std::default::Default::default() } - // string content_type = 1; - - - pub fn get_content_type(&self) -> &str { - &self.content_type - } - pub fn clear_content_type(&mut self) { - self.content_type.clear(); - } - - // Param is passed by value, moved - pub fn set_content_type(&mut self, v: ::std::string::String) { - self.content_type = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_content_type(&mut self) -> &mut ::std::string::String { - &mut self.content_type - } - - // Take field - pub fn take_content_type(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.content_type, ::std::string::String::new()) - } - - // bytes data = 2; - - - pub fn get_data(&self) -> &[u8] { - &self.data - } - pub fn clear_data(&mut self) { - self.data.clear(); - } - - // Param is passed by value, moved - pub fn set_data(&mut self, v: ::std::vec::Vec) { - self.data = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_data(&mut self) -> &mut ::std::vec::Vec { - &mut self.data - } - - // Take field - pub fn take_data(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.data, ::std::vec::Vec::new()) - } - - // repeated .google.protobuf.Any extensions = 3; - - - pub fn get_extensions(&self) -> &[::protobuf::well_known_types::Any] { - &self.extensions - } - pub fn clear_extensions(&mut self) { - self.extensions.clear(); - } - - // Param is passed by value, moved - pub fn set_extensions(&mut self, v: ::protobuf::RepeatedField<::protobuf::well_known_types::Any>) { - self.extensions = v; - } - - // Mutable pointer to the field. - pub fn mut_extensions(&mut self) -> &mut ::protobuf::RepeatedField<::protobuf::well_known_types::Any> { - &mut self.extensions - } - - // Take field - pub fn take_extensions(&mut self) -> ::protobuf::RepeatedField<::protobuf::well_known_types::Any> { - ::std::mem::replace(&mut self.extensions, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "content_type", + |m: &HttpBody| { &m.content_type }, + |m: &mut HttpBody| { &mut m.content_type }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "data", + |m: &HttpBody| { &m.data }, + |m: &mut HttpBody| { &mut m.data }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "extensions", + |m: &HttpBody| { &m.extensions }, + |m: &mut HttpBody| { &mut m.extensions }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "HttpBody", + fields, + oneofs, + ) } } impl ::protobuf::Message for HttpBody { + const NAME: &'static str = "HttpBody"; + fn is_initialized(&self) -> bool { - for v in &self.extensions { - 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.content_type)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.content_type = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?; + 18 => { + self.data = is.read_bytes()?; }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.extensions)?; + 26 => { + self.extensions.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -156,7 +110,7 @@ impl ::protobuf::Message for HttpBody { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.content_type.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.content_type); @@ -166,14 +120,14 @@ impl ::protobuf::Message for HttpBody { } for value in &self.extensions { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.content_type.is_empty() { os.write_string(1, &self.content_type)?; } @@ -181,96 +135,57 @@ impl ::protobuf::Message for HttpBody { os.write_bytes(2, &self.data)?; } for v in &self.extensions { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> HttpBody { HttpBody::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "content_type", - |m: &HttpBody| { &m.content_type }, - |m: &mut HttpBody| { &mut m.content_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "data", - |m: &HttpBody| { &m.data }, - |m: &mut HttpBody| { &mut m.data }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>( - "extensions", - |m: &HttpBody| { &m.extensions }, - |m: &mut HttpBody| { &mut m.extensions }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "HttpBody", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.content_type.clear(); + self.data.clear(); + self.extensions.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static HttpBody { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(HttpBody::new) + static instance: HttpBody = HttpBody { + content_type: ::std::string::String::new(), + data: ::std::vec::Vec::new(), + extensions: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for HttpBody { - fn clear(&mut self) { - self.content_type.clear(); - self.data.clear(); - self.extensions.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for HttpBody { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("HttpBody").unwrap()).clone() } } -impl ::std::fmt::Debug for HttpBody { +impl ::std::fmt::Display for HttpBody { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for HttpBody { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -281,7 +196,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x0ecom.google.apiB\rHttpBodyProtoP\x01Z;google.golang.org/genproto/goog\ leapis/api/httpbody;httpbody\xf8\x01\x01\xa2\x02\x04GAPIJ\xb0\x13\n\x06\ \x12\x04\x0e\0P\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Co\ - pyright\x202023\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apac\ + pyright\x202024\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apac\ he\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20ma\ y\x20not\x20use\x20this\x20file\x20except\x20in\x20compliance\x20with\ \x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\ @@ -346,14 +261,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x1f)\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03O,-b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(1); + deps.push(::protobuf::well_known_types::any::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(1); + messages.push(HttpBody::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/label.rs b/googleapis-raw/src/api/label.rs index 7122cc6..4c3a91c 100644 --- a/googleapis-raw/src/api/label.rs +++ b/googleapis-raw/src/api/label.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,30 +9,39 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/label.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +/// A description of a label. +// @@protoc_insertion_point(message:google.api.LabelDescriptor) +#[derive(PartialEq,Clone,Default,Debug)] pub struct LabelDescriptor { // message fields + /// The label key. + // @@protoc_insertion_point(field:google.api.LabelDescriptor.key) pub key: ::std::string::String, - pub value_type: LabelDescriptor_ValueType, + /// The type of data that can be assigned to the label. + // @@protoc_insertion_point(field:google.api.LabelDescriptor.value_type) + pub value_type: ::protobuf::EnumOrUnknown, + /// A human-readable description for the label. + // @@protoc_insertion_point(field:google.api.LabelDescriptor.description) pub description: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.LabelDescriptor.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a LabelDescriptor { @@ -45,94 +55,53 @@ impl LabelDescriptor { ::std::default::Default::default() } - // string key = 1; - - - pub fn get_key(&self) -> &str { - &self.key - } - pub fn clear_key(&mut self) { - self.key.clear(); - } - - // Param is passed by value, moved - pub fn set_key(&mut self, v: ::std::string::String) { - self.key = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key(&mut self) -> &mut ::std::string::String { - &mut self.key - } - - // Take field - pub fn take_key(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.key, ::std::string::String::new()) - } - - // .google.api.LabelDescriptor.ValueType value_type = 2; - - - pub fn get_value_type(&self) -> LabelDescriptor_ValueType { - self.value_type - } - pub fn clear_value_type(&mut self) { - self.value_type = LabelDescriptor_ValueType::STRING; - } - - // Param is passed by value, moved - pub fn set_value_type(&mut self, v: LabelDescriptor_ValueType) { - self.value_type = v; - } - - // string description = 3; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "key", + |m: &LabelDescriptor| { &m.key }, + |m: &mut LabelDescriptor| { &mut m.key }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "value_type", + |m: &LabelDescriptor| { &m.value_type }, + |m: &mut LabelDescriptor| { &mut m.value_type }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "description", + |m: &LabelDescriptor| { &m.description }, + |m: &mut LabelDescriptor| { &mut m.description }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "LabelDescriptor", + fields, + oneofs, + ) } } impl ::protobuf::Message for LabelDescriptor { + const NAME: &'static str = "LabelDescriptor"; + 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.key)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.key = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.value_type, 2, &mut self.unknown_fields)? + 16 => { + self.value_type = is.read_enum_or_unknown()?; }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; + 26 => { + self.description = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -141,170 +110,151 @@ impl ::protobuf::Message for LabelDescriptor { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.key.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.key); } - if self.value_type != LabelDescriptor_ValueType::STRING { - my_size += ::protobuf::rt::enum_size(2, self.value_type); + if self.value_type != ::protobuf::EnumOrUnknown::new(label_descriptor::ValueType::STRING) { + my_size += ::protobuf::rt::int32_size(2, self.value_type.value()); } if !self.description.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.description); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.key.is_empty() { os.write_string(1, &self.key)?; } - if self.value_type != LabelDescriptor_ValueType::STRING { - os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.value_type))?; + if self.value_type != ::protobuf::EnumOrUnknown::new(label_descriptor::ValueType::STRING) { + os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.value_type))?; } if !self.description.is_empty() { os.write_string(3, &self.description)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> LabelDescriptor { LabelDescriptor::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "key", - |m: &LabelDescriptor| { &m.key }, - |m: &mut LabelDescriptor| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "value_type", - |m: &LabelDescriptor| { &m.value_type }, - |m: &mut LabelDescriptor| { &mut m.value_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &LabelDescriptor| { &m.description }, - |m: &mut LabelDescriptor| { &mut m.description }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "LabelDescriptor", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.key.clear(); + self.value_type = ::protobuf::EnumOrUnknown::new(label_descriptor::ValueType::STRING); + self.description.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static LabelDescriptor { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(LabelDescriptor::new) + static instance: LabelDescriptor = LabelDescriptor { + key: ::std::string::String::new(), + value_type: ::protobuf::EnumOrUnknown::from_i32(0), + description: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for LabelDescriptor { - fn clear(&mut self) { - self.key.clear(); - self.value_type = LabelDescriptor_ValueType::STRING; - self.description.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for LabelDescriptor { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("LabelDescriptor").unwrap()).clone() } } -impl ::std::fmt::Debug for LabelDescriptor { +impl ::std::fmt::Display for LabelDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for LabelDescriptor { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum LabelDescriptor_ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2, -} +/// Nested message and enums of message `LabelDescriptor` +pub mod label_descriptor { + /// Value types that can be used as label values. + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.LabelDescriptor.ValueType) + pub enum ValueType { + // @@protoc_insertion_point(enum_value:google.api.LabelDescriptor.ValueType.STRING) + STRING = 0, + // @@protoc_insertion_point(enum_value:google.api.LabelDescriptor.ValueType.BOOL) + BOOL = 1, + // @@protoc_insertion_point(enum_value:google.api.LabelDescriptor.ValueType.INT64) + INT64 = 2, + } + + impl ::protobuf::Enum for ValueType { + const NAME: &'static str = "ValueType"; + + fn value(&self) -> i32 { + *self as i32 + } -impl ::protobuf::ProtobufEnum for LabelDescriptor_ValueType { - fn value(&self) -> i32 { - *self as i32 - } + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(ValueType::STRING), + 1 => ::std::option::Option::Some(ValueType::BOOL), + 2 => ::std::option::Option::Some(ValueType::INT64), + _ => ::std::option::Option::None + } + } - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(LabelDescriptor_ValueType::STRING), - 1 => ::std::option::Option::Some(LabelDescriptor_ValueType::BOOL), - 2 => ::std::option::Option::Some(LabelDescriptor_ValueType::INT64), - _ => ::std::option::Option::None + fn from_str(str: &str) -> ::std::option::Option { + match str { + "STRING" => ::std::option::Option::Some(ValueType::STRING), + "BOOL" => ::std::option::Option::Some(ValueType::BOOL), + "INT64" => ::std::option::Option::Some(ValueType::INT64), + _ => ::std::option::Option::None + } } - } - fn values() -> &'static [Self] { - static values: &'static [LabelDescriptor_ValueType] = &[ - LabelDescriptor_ValueType::STRING, - LabelDescriptor_ValueType::BOOL, - LabelDescriptor_ValueType::INT64, + const VALUES: &'static [ValueType] = &[ + ValueType::STRING, + ValueType::BOOL, + ValueType::INT64, ]; - values } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("LabelDescriptor.ValueType", file_descriptor_proto()) - }) - } -} + impl ::protobuf::EnumFull for ValueType { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("LabelDescriptor.ValueType").unwrap()).clone() + } -impl ::std::marker::Copy for LabelDescriptor_ValueType { -} + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } + } -impl ::std::default::Default for LabelDescriptor_ValueType { - fn default() -> Self { - LabelDescriptor_ValueType::STRING + impl ::std::default::Default for ValueType { + fn default() -> Self { + ValueType::STRING + } } -} -impl ::protobuf::reflect::ProtobufValue for LabelDescriptor_ValueType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + impl ValueType { + pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("LabelDescriptor.ValueType") + } } } @@ -317,7 +267,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x02B_\n\x0ecom.google.apiB\nLabelProtoP\x01Z5google.golang.org/genproto\ /googleapis/api/label;label\xf8\x01\x01\xa2\x02\x04GAPIJ\xe4\n\n\x06\x12\ \x04\x0e\0/\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyri\ - ght\x202023\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\ + ght\x202024\x20Google\x20LLC\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\x20\ the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\x20the\x20L\ @@ -360,14 +310,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \n\x05\x04\0\x02\x02\x03\x12\x03.\x17\x18b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(1); + messages.push(LabelDescriptor::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(label_descriptor::ValueType::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/launch_stage.rs b/googleapis-raw/src/api/launch_stage.rs index ceb38cd..8b3e1bc 100644 --- a/googleapis-raw/src/api/launch_stage.rs +++ b/googleapis-raw/src/api/launch_stage.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,34 +9,48 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/launch_stage.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +/// The launch stage as defined by [Google Cloud Platform +/// Launch Stages](https://cloud.google.com/terms/launch-stages). +#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] +// @@protoc_insertion_point(enum:google.api.LaunchStage) pub enum LaunchStage { + // @@protoc_insertion_point(enum_value:google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED) LAUNCH_STAGE_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.LaunchStage.UNIMPLEMENTED) UNIMPLEMENTED = 6, + // @@protoc_insertion_point(enum_value:google.api.LaunchStage.PRELAUNCH) PRELAUNCH = 7, + // @@protoc_insertion_point(enum_value:google.api.LaunchStage.EARLY_ACCESS) EARLY_ACCESS = 1, + // @@protoc_insertion_point(enum_value:google.api.LaunchStage.ALPHA) ALPHA = 2, + // @@protoc_insertion_point(enum_value:google.api.LaunchStage.BETA) BETA = 3, + // @@protoc_insertion_point(enum_value:google.api.LaunchStage.GA) GA = 4, + // @@protoc_insertion_point(enum_value:google.api.LaunchStage.DEPRECATED) DEPRECATED = 5, } -impl ::protobuf::ProtobufEnum for LaunchStage { +impl ::protobuf::Enum for LaunchStage { + const NAME: &'static str = "LaunchStage"; + fn value(&self) -> i32 { *self as i32 } @@ -54,29 +69,51 @@ impl ::protobuf::ProtobufEnum for LaunchStage { } } - fn values() -> &'static [Self] { - static values: &'static [LaunchStage] = &[ - LaunchStage::LAUNCH_STAGE_UNSPECIFIED, - LaunchStage::UNIMPLEMENTED, - LaunchStage::PRELAUNCH, - LaunchStage::EARLY_ACCESS, - LaunchStage::ALPHA, - LaunchStage::BETA, - LaunchStage::GA, - LaunchStage::DEPRECATED, - ]; - values + fn from_str(str: &str) -> ::std::option::Option { + match str { + "LAUNCH_STAGE_UNSPECIFIED" => ::std::option::Option::Some(LaunchStage::LAUNCH_STAGE_UNSPECIFIED), + "UNIMPLEMENTED" => ::std::option::Option::Some(LaunchStage::UNIMPLEMENTED), + "PRELAUNCH" => ::std::option::Option::Some(LaunchStage::PRELAUNCH), + "EARLY_ACCESS" => ::std::option::Option::Some(LaunchStage::EARLY_ACCESS), + "ALPHA" => ::std::option::Option::Some(LaunchStage::ALPHA), + "BETA" => ::std::option::Option::Some(LaunchStage::BETA), + "GA" => ::std::option::Option::Some(LaunchStage::GA), + "DEPRECATED" => ::std::option::Option::Some(LaunchStage::DEPRECATED), + _ => ::std::option::Option::None + } } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("LaunchStage", file_descriptor_proto()) - }) - } + const VALUES: &'static [LaunchStage] = &[ + LaunchStage::LAUNCH_STAGE_UNSPECIFIED, + LaunchStage::UNIMPLEMENTED, + LaunchStage::PRELAUNCH, + LaunchStage::EARLY_ACCESS, + LaunchStage::ALPHA, + LaunchStage::BETA, + LaunchStage::GA, + LaunchStage::DEPRECATED, + ]; } -impl ::std::marker::Copy for LaunchStage { +impl ::protobuf::EnumFull for LaunchStage { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().enum_by_package_relative_name("LaunchStage").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = match self { + LaunchStage::LAUNCH_STAGE_UNSPECIFIED => 0, + LaunchStage::UNIMPLEMENTED => 1, + LaunchStage::PRELAUNCH => 2, + LaunchStage::EARLY_ACCESS => 3, + LaunchStage::ALPHA => 4, + LaunchStage::BETA => 5, + LaunchStage::GA => 6, + LaunchStage::DEPRECATED => 7, + }; + Self::enum_descriptor().value_by_index(index) + } } impl ::std::default::Default for LaunchStage { @@ -85,9 +122,9 @@ impl ::std::default::Default for LaunchStage { } } -impl ::protobuf::reflect::ProtobufValue for LaunchStage { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) +impl LaunchStage { + fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("LaunchStage") } } @@ -99,7 +136,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x04\x12\x0e\n\nDEPRECATED\x10\x05BZ\n\x0ecom.google.apiB\x10LaunchStage\ ProtoP\x01Z-google.golang.org/genproto/googleapis/api;api\xa2\x02\x04GAP\ IJ\xc2\x17\n\x06\x12\x04\x0e\0G\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\ - \x122\xb1\x04\x20Copyright\x202023\x20Google\x20LLC\n\n\x20Licensed\x20u\ + \x122\xb1\x04\x20Copyright\x202024\x20Google\x20LLC\n\n\x20Licensed\x20u\ nder\x20the\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\ \");\n\x20you\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20co\ mpliance\x20with\x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20co\ @@ -176,14 +213,31 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x03F\x0f\x10b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(0); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(LaunchStage::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/log.rs b/googleapis-raw/src/api/log.rs index 88bfc94..bcce03d 100644 --- a/googleapis-raw/src/api/log.rs +++ b/googleapis-raw/src/api/log.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,31 +9,48 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/log.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.LogDescriptor) +#[derive(PartialEq,Clone,Default,Debug)] pub struct LogDescriptor { // message fields + /// The name of the log. It must be less than 512 characters long and can + /// include the following characters: upper- and lower-case alphanumeric + /// characters [A-Za-z0-9], and punctuation characters including + /// slash, underscore, hyphen, period [/_-.]. + // @@protoc_insertion_point(field:google.api.LogDescriptor.name) pub name: ::std::string::String, - pub labels: ::protobuf::RepeatedField, + /// The set of labels that are available to describe a specific log entry. + /// Runtime requests that contain labels not specified here are + /// considered invalid. + // @@protoc_insertion_point(field:google.api.LogDescriptor.labels) + pub labels: ::std::vec::Vec, + /// A human-readable description of this log. This information appears in + /// the documentation and can contain details. + // @@protoc_insertion_point(field:google.api.LogDescriptor.description) pub description: ::std::string::String, + /// The human-readable name for this log. This information appears on + /// the user interface and should be concise. + // @@protoc_insertion_point(field:google.api.LogDescriptor.display_name) pub display_name: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.LogDescriptor.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a LogDescriptor { @@ -46,138 +64,61 @@ impl LogDescriptor { ::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()) - } - - // repeated .google.api.LabelDescriptor labels = 2; - - - pub fn get_labels(&self) -> &[super::label::LabelDescriptor] { - &self.labels - } - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::protobuf::RepeatedField) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.labels, ::protobuf::RepeatedField::new()) - } - - // string description = 3; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::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()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(4); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &LogDescriptor| { &m.name }, + |m: &mut LogDescriptor| { &mut m.name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "labels", + |m: &LogDescriptor| { &m.labels }, + |m: &mut LogDescriptor| { &mut m.labels }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "description", + |m: &LogDescriptor| { &m.description }, + |m: &mut LogDescriptor| { &mut m.description }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "display_name", + |m: &LogDescriptor| { &m.display_name }, + |m: &mut LogDescriptor| { &mut m.display_name }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "LogDescriptor", + fields, + oneofs, + ) } } impl ::protobuf::Message for LogDescriptor { + const NAME: &'static str = "LogDescriptor"; + fn is_initialized(&self) -> bool { - for v in &self.labels { - 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)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.name = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.labels)?; + 18 => { + self.labels.push(is.read_message()?); }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; + 26 => { + self.description = is.read_string()?; }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.display_name)?; + 34 => { + self.display_name = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -186,14 +127,14 @@ impl ::protobuf::Message for LogDescriptor { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.name); } for value in &self.labels { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if !self.description.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.description); @@ -201,19 +142,17 @@ impl ::protobuf::Message for LogDescriptor { if !self.display_name.is_empty() { my_size += ::protobuf::rt::string_size(4, &self.display_name); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.name.is_empty() { os.write_string(1, &self.name)?; } for v in &self.labels { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }; if !self.description.is_empty() { os.write_string(3, &self.description)?; @@ -221,98 +160,57 @@ impl ::protobuf::Message for LogDescriptor { if !self.display_name.is_empty() { os.write_string(4, &self.display_name)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> LogDescriptor { LogDescriptor::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &LogDescriptor| { &m.name }, - |m: &mut LogDescriptor| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "labels", - |m: &LogDescriptor| { &m.labels }, - |m: &mut LogDescriptor| { &mut m.labels }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &LogDescriptor| { &m.description }, - |m: &mut LogDescriptor| { &mut m.description }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "display_name", - |m: &LogDescriptor| { &m.display_name }, - |m: &mut LogDescriptor| { &mut m.display_name }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "LogDescriptor", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.name.clear(); + self.labels.clear(); + self.description.clear(); + self.display_name.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static LogDescriptor { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(LogDescriptor::new) + static instance: LogDescriptor = LogDescriptor { + name: ::std::string::String::new(), + labels: ::std::vec::Vec::new(), + description: ::std::string::String::new(), + display_name: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for LogDescriptor { - fn clear(&mut self) { - self.name.clear(); - self.labels.clear(); - self.description.clear(); - self.display_name.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for LogDescriptor { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("LogDescriptor").unwrap()).clone() } } -impl ::std::fmt::Debug for LogDescriptor { +impl ::std::fmt::Display for LogDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for LogDescriptor { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -323,7 +221,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x12!\n\x0cdisplay_name\x18\x04\x20\x01(\tR\x0bdisplayNameBj\n\x0ecom.go\ ogle.apiB\x08LogProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/se\ rviceconfig;serviceconfig\xa2\x02\x04GAPIJ\xfe\x0e\n\x06\x12\x04\x0e\05\ - \x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\ + \x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\ \x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\ \x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20us\ e\x20this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20Licens\ @@ -376,14 +274,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x04\0\x02\x03\x03\x12\x034\x18\x19b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(1); + deps.push(super::label::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(1); + messages.push(LogDescriptor::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/logging.rs b/googleapis-raw/src/api/logging.rs index 81da42d..adedc5f 100644 --- a/googleapis-raw/src/api/logging.rs +++ b/googleapis-raw/src/api/logging.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,29 +9,41 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/logging.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Logging) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Logging { // message fields - pub producer_destinations: ::protobuf::RepeatedField, - pub consumer_destinations: ::protobuf::RepeatedField, + /// Logging configurations for sending logs to the producer project. + /// There can be multiple producer destinations, each one must have a + /// different monitored resource type. A log can be used in at most + /// one producer destination. + // @@protoc_insertion_point(field:google.api.Logging.producer_destinations) + pub producer_destinations: ::std::vec::Vec, + /// Logging configurations for sending logs to the consumer project. + /// There can be multiple consumer destinations, each one must have a + /// different monitored resource type. A log can be used in at most + /// one consumer destination. + // @@protoc_insertion_point(field:google.api.Logging.consumer_destinations) + pub consumer_destinations: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Logging.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Logging { @@ -44,84 +57,45 @@ impl Logging { ::std::default::Default::default() } - // repeated .google.api.Logging.LoggingDestination producer_destinations = 1; - - - pub fn get_producer_destinations(&self) -> &[Logging_LoggingDestination] { - &self.producer_destinations - } - pub fn clear_producer_destinations(&mut self) { - self.producer_destinations.clear(); - } - - // Param is passed by value, moved - pub fn set_producer_destinations(&mut self, v: ::protobuf::RepeatedField) { - self.producer_destinations = v; - } - - // Mutable pointer to the field. - pub fn mut_producer_destinations(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.producer_destinations - } - - // Take field - pub fn take_producer_destinations(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.producer_destinations, ::protobuf::RepeatedField::new()) - } - - // repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; - - - pub fn get_consumer_destinations(&self) -> &[Logging_LoggingDestination] { - &self.consumer_destinations - } - pub fn clear_consumer_destinations(&mut self) { - self.consumer_destinations.clear(); - } - - // Param is passed by value, moved - pub fn set_consumer_destinations(&mut self, v: ::protobuf::RepeatedField) { - self.consumer_destinations = v; - } - - // Mutable pointer to the field. - pub fn mut_consumer_destinations(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.consumer_destinations - } - - // Take field - pub fn take_consumer_destinations(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.consumer_destinations, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "producer_destinations", + |m: &Logging| { &m.producer_destinations }, + |m: &mut Logging| { &mut m.producer_destinations }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "consumer_destinations", + |m: &Logging| { &m.consumer_destinations }, + |m: &mut Logging| { &mut m.consumer_destinations }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Logging", + fields, + oneofs, + ) } } impl ::protobuf::Message for Logging { + const NAME: &'static str = "Logging"; + fn is_initialized(&self) -> bool { - for v in &self.producer_destinations { - if !v.is_initialized() { - return false; - } - }; - for v in &self.consumer_destinations { - 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.producer_destinations)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.producer_destinations.push(is.read_message()?); }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.consumer_destinations)?; + 18 => { + self.consumer_destinations.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -130,311 +104,226 @@ impl ::protobuf::Message for Logging { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.producer_destinations { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for value in &self.consumer_destinations { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.producer_destinations { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; for v in &self.consumer_destinations { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Logging { Logging::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "producer_destinations", - |m: &Logging| { &m.producer_destinations }, - |m: &mut Logging| { &mut m.producer_destinations }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "consumer_destinations", - |m: &Logging| { &m.consumer_destinations }, - |m: &mut Logging| { &mut m.consumer_destinations }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Logging", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.producer_destinations.clear(); + self.consumer_destinations.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Logging { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Logging::new) + static instance: Logging = Logging { + producer_destinations: ::std::vec::Vec::new(), + consumer_destinations: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Logging { - fn clear(&mut self) { - self.producer_destinations.clear(); - self.consumer_destinations.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Logging { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Logging").unwrap()).clone() } } -impl ::std::fmt::Debug for Logging { +impl ::std::fmt::Display for Logging { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Logging { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] -pub struct Logging_LoggingDestination { - // message fields - pub monitored_resource: ::std::string::String, - pub logs: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Logging_LoggingDestination { - fn default() -> &'a Logging_LoggingDestination { - ::default_instance() - } -} - -impl Logging_LoggingDestination { - pub fn new() -> Logging_LoggingDestination { - ::std::default::Default::default() - } - - // string monitored_resource = 3; - - - pub fn get_monitored_resource(&self) -> &str { - &self.monitored_resource - } - pub fn clear_monitored_resource(&mut self) { - self.monitored_resource.clear(); - } - - // Param is passed by value, moved - pub fn set_monitored_resource(&mut self, v: ::std::string::String) { - self.monitored_resource = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_monitored_resource(&mut self) -> &mut ::std::string::String { - &mut self.monitored_resource - } - - // Take field - pub fn take_monitored_resource(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.monitored_resource, ::std::string::String::new()) +/// Nested message and enums of message `Logging` +pub mod logging { + /// Configuration of a specific logging destination (the producer project + /// or the consumer project). + // @@protoc_insertion_point(message:google.api.Logging.LoggingDestination) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct LoggingDestination { + // message fields + /// The monitored resource type. The type must be defined in the + /// [Service.monitored_resources][google.api.Service.monitored_resources] + /// section. + // @@protoc_insertion_point(field:google.api.Logging.LoggingDestination.monitored_resource) + pub monitored_resource: ::std::string::String, + /// Names of the logs to be sent to this destination. Each name must + /// be defined in the [Service.logs][google.api.Service.logs] section. If the + /// log name is not a domain scoped name, it will be automatically prefixed + /// with the service name followed by "/". + // @@protoc_insertion_point(field:google.api.Logging.LoggingDestination.logs) + pub logs: ::std::vec::Vec<::std::string::String>, + // special fields + // @@protoc_insertion_point(special_field:google.api.Logging.LoggingDestination.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a LoggingDestination { + fn default() -> &'a LoggingDestination { + ::default_instance() + } } - // repeated string logs = 1; - - - pub fn get_logs(&self) -> &[::std::string::String] { - &self.logs - } - pub fn clear_logs(&mut self) { - self.logs.clear(); - } + impl LoggingDestination { + pub fn new() -> LoggingDestination { + ::std::default::Default::default() + } - // Param is passed by value, moved - pub fn set_logs(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.logs = v; + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "monitored_resource", + |m: &LoggingDestination| { &m.monitored_resource }, + |m: &mut LoggingDestination| { &mut m.monitored_resource }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "logs", + |m: &LoggingDestination| { &m.logs }, + |m: &mut LoggingDestination| { &mut m.logs }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Logging.LoggingDestination", + fields, + oneofs, + ) + } } - // Mutable pointer to the field. - pub fn mut_logs(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.logs - } + impl ::protobuf::Message for LoggingDestination { + const NAME: &'static str = "LoggingDestination"; - // Take field - pub fn take_logs(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.logs, ::protobuf::RepeatedField::new()) - } -} + fn is_initialized(&self) -> bool { + true + } -impl ::protobuf::Message for Logging_LoggingDestination { - fn is_initialized(&self) -> bool { - true - } + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 26 => { + self.monitored_resource = is.read_string()?; + }, + 10 => { + self.logs.push(is.read_string()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } - 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 { - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.monitored_resource)?; - }, - 1 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.logs)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if !self.monitored_resource.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.monitored_resource); + } + for value in &self.logs { + my_size += ::protobuf::rt::string_size(1, &value); }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size } - ::std::result::Result::Ok(()) - } - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.monitored_resource.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.monitored_resource); + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.monitored_resource.is_empty() { + os.write_string(3, &self.monitored_resource)?; + } + for v in &self.logs { + os.write_string(1, &v)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) } - for value in &self.logs { - 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<()> { - if !self.monitored_resource.is_empty() { - os.write_string(3, &self.monitored_resource)?; + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - for v in &self.logs { - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } - fn new() -> Logging_LoggingDestination { - Logging_LoggingDestination::new() - } + fn new() -> LoggingDestination { + LoggingDestination::new() + } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "monitored_resource", - |m: &Logging_LoggingDestination| { &m.monitored_resource }, - |m: &mut Logging_LoggingDestination| { &mut m.monitored_resource }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "logs", - |m: &Logging_LoggingDestination| { &m.logs }, - |m: &mut Logging_LoggingDestination| { &mut m.logs }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Logging.LoggingDestination", - fields, - file_descriptor_proto() - ) - }) - } + fn clear(&mut self) { + self.monitored_resource.clear(); + self.logs.clear(); + self.special_fields.clear(); + } - fn default_instance() -> &'static Logging_LoggingDestination { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Logging_LoggingDestination::new) + fn default_instance() -> &'static LoggingDestination { + static instance: LoggingDestination = LoggingDestination { + monitored_resource: ::std::string::String::new(), + logs: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } } -} -impl ::protobuf::Clear for Logging_LoggingDestination { - fn clear(&mut self) { - self.monitored_resource.clear(); - self.logs.clear(); - self.unknown_fields.clear(); + impl ::protobuf::MessageFull for LoggingDestination { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Logging.LoggingDestination").unwrap()).clone() + } } -} -impl ::std::fmt::Debug for Logging_LoggingDestination { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + impl ::std::fmt::Display for LoggingDestination { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } -} -impl ::protobuf::reflect::ProtobufValue for Logging_LoggingDestination { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) + impl ::protobuf::reflect::ProtobufValue for LoggingDestination { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } } @@ -448,7 +337,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x01\x20\x03(\tR\x04logsBn\n\x0ecom.google.apiB\x0cLoggingProtoP\x01ZEgo\ ogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\ \x02\x04GAPIJ\x9a\x17\n\x06\x12\x04\x0e\0P\x01\n\xbc\x04\n\x01\x0c\x12\ - \x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Google\x20LLC\n\n\x20Lic\ + \x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20Google\x20LLC\n\n\x20Lic\ ensed\x20under\x20the\x20Apache\x20License,\x20Version\x202.0\x20(the\ \x20\"License\");\n\x20you\x20may\x20not\x20use\x20this\x20file\x20excep\ t\x20in\x20compliance\x20with\x20the\x20License.\n\x20You\x20may\x20obta\ @@ -527,14 +416,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x12\x03O67b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(Logging::generated_message_descriptor_data()); + messages.push(logging::LoggingDestination::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/metric.rs b/googleapis-raw/src/api/metric.rs index 80891cb..0622e0d 100644 --- a/googleapis-raw/src/api/metric.rs +++ b/googleapis-raw/src/api/metric.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,38 +9,79 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/metric.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default)] +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; + +/// Defines a metric type and its schema. Once a metric descriptor is created, +/// deleting or altering it stops data collection and makes the metric type's +/// existing data unusable. +/// +// @@protoc_insertion_point(message:google.api.MetricDescriptor) +#[derive(PartialEq,Clone,Default,Debug)] pub struct MetricDescriptor { // message fields + /// The resource name of the metric descriptor. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.name) pub name: ::std::string::String, - pub field_type: ::std::string::String, - pub labels: ::protobuf::RepeatedField, - pub metric_kind: MetricDescriptor_MetricKind, - pub value_type: MetricDescriptor_ValueType, + // @@protoc_insertion_point(field:google.api.MetricDescriptor.type) + pub type_: ::std::string::String, + /// The set of labels that can be used to describe a specific + /// instance of this metric type. For example, the + /// `appengine.googleapis.com/http/server/response_latencies` metric + /// type has a label for the HTTP response code, `response_code`, so + /// you can look at latencies for successful responses or just + /// for responses that failed. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.labels) + pub labels: ::std::vec::Vec, + /// Whether the metric records instantaneous values, changes to a value, etc. + /// Some combinations of `metric_kind` and `value_type` might not be supported. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.metric_kind) + pub metric_kind: ::protobuf::EnumOrUnknown, + /// Whether the measurement is an integer, a floating-point number, etc. + /// Some combinations of `metric_kind` and `value_type` might not be supported. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.value_type) + pub value_type: ::protobuf::EnumOrUnknown, + // @@protoc_insertion_point(field:google.api.MetricDescriptor.unit) pub unit: ::std::string::String, + /// A detailed description of the metric, which can be used in documentation. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.description) pub description: ::std::string::String, + /// A concise name for the metric, which can be displayed in user interfaces. + /// Use sentence case without an ending period, for example "Request count". + /// This field is optional but it is recommended to be set for any metrics + /// associated with user-visible concepts, such as Quota. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.display_name) pub display_name: ::std::string::String, - pub metadata: ::protobuf::SingularPtrField, - pub launch_stage: super::launch_stage::LaunchStage, - pub monitored_resource_types: ::protobuf::RepeatedField<::std::string::String>, + /// Optional. Metadata which can be used to guide usage of the metric. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.metadata) + pub metadata: ::protobuf::MessageField, + /// Optional. The launch stage of the metric definition. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.launch_stage) + pub launch_stage: ::protobuf::EnumOrUnknown, + /// Read-only. If present, then a [time + /// series][google.monitoring.v3.TimeSeries], which is identified partially by + /// a metric type and a + /// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that + /// is associated with this metric type can only be associated with one of the + /// monitored resource types listed here. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.monitored_resource_types) + pub monitored_resource_types: ::std::vec::Vec<::std::string::String>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.MetricDescriptor.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a MetricDescriptor { @@ -53,319 +95,117 @@ impl MetricDescriptor { ::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 type = 8; - - - pub fn get_field_type(&self) -> &str { - &self.field_type - } - pub fn clear_field_type(&mut self) { - self.field_type.clear(); - } - - // Param is passed by value, moved - pub fn set_field_type(&mut self, v: ::std::string::String) { - self.field_type = 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 ::std::string::String { - &mut self.field_type - } - - // Take field - pub fn take_field_type(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.field_type, ::std::string::String::new()) - } - - // repeated .google.api.LabelDescriptor labels = 2; - - - pub fn get_labels(&self) -> &[super::label::LabelDescriptor] { - &self.labels - } - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::protobuf::RepeatedField) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.labels, ::protobuf::RepeatedField::new()) - } - - // .google.api.MetricDescriptor.MetricKind metric_kind = 3; - - - pub fn get_metric_kind(&self) -> MetricDescriptor_MetricKind { - self.metric_kind - } - pub fn clear_metric_kind(&mut self) { - self.metric_kind = MetricDescriptor_MetricKind::METRIC_KIND_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_metric_kind(&mut self, v: MetricDescriptor_MetricKind) { - self.metric_kind = v; - } - - // .google.api.MetricDescriptor.ValueType value_type = 4; - - - pub fn get_value_type(&self) -> MetricDescriptor_ValueType { - self.value_type - } - pub fn clear_value_type(&mut self) { - self.value_type = MetricDescriptor_ValueType::VALUE_TYPE_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_value_type(&mut self, v: MetricDescriptor_ValueType) { - self.value_type = v; - } - - // string unit = 5; - - - pub fn get_unit(&self) -> &str { - &self.unit - } - pub fn clear_unit(&mut self) { - self.unit.clear(); - } - - // Param is passed by value, moved - pub fn set_unit(&mut self, v: ::std::string::String) { - self.unit = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_unit(&mut self) -> &mut ::std::string::String { - &mut self.unit - } - - // Take field - pub fn take_unit(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.unit, ::std::string::String::new()) - } - - // string description = 6; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string display_name = 7; - - - 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.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; - - - pub fn get_metadata(&self) -> &MetricDescriptor_MetricDescriptorMetadata { - self.metadata.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_metadata(&mut self) { - self.metadata.clear(); - } - - pub fn has_metadata(&self) -> bool { - self.metadata.is_some() - } - - // Param is passed by value, moved - pub fn set_metadata(&mut self, v: MetricDescriptor_MetricDescriptorMetadata) { - self.metadata = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_metadata(&mut self) -> &mut MetricDescriptor_MetricDescriptorMetadata { - if self.metadata.is_none() { - self.metadata.set_default(); - } - self.metadata.as_mut().unwrap() - } - - // Take field - pub fn take_metadata(&mut self) -> MetricDescriptor_MetricDescriptorMetadata { - self.metadata.take().unwrap_or_else(|| MetricDescriptor_MetricDescriptorMetadata::new()) - } - - // .google.api.LaunchStage launch_stage = 12; - - - pub fn get_launch_stage(&self) -> super::launch_stage::LaunchStage { - self.launch_stage - } - pub fn clear_launch_stage(&mut self) { - self.launch_stage = super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_launch_stage(&mut self, v: super::launch_stage::LaunchStage) { - self.launch_stage = v; - } - - // repeated string monitored_resource_types = 13; - - - pub fn get_monitored_resource_types(&self) -> &[::std::string::String] { - &self.monitored_resource_types - } - pub fn clear_monitored_resource_types(&mut self) { - self.monitored_resource_types.clear(); - } - - // Param is passed by value, moved - pub fn set_monitored_resource_types(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.monitored_resource_types = v; - } - - // Mutable pointer to the field. - pub fn mut_monitored_resource_types(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.monitored_resource_types - } - - // Take field - pub fn take_monitored_resource_types(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.monitored_resource_types, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(11); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &MetricDescriptor| { &m.name }, + |m: &mut MetricDescriptor| { &mut m.name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "type", + |m: &MetricDescriptor| { &m.type_ }, + |m: &mut MetricDescriptor| { &mut m.type_ }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "labels", + |m: &MetricDescriptor| { &m.labels }, + |m: &mut MetricDescriptor| { &mut m.labels }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "metric_kind", + |m: &MetricDescriptor| { &m.metric_kind }, + |m: &mut MetricDescriptor| { &mut m.metric_kind }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "value_type", + |m: &MetricDescriptor| { &m.value_type }, + |m: &mut MetricDescriptor| { &mut m.value_type }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "unit", + |m: &MetricDescriptor| { &m.unit }, + |m: &mut MetricDescriptor| { &mut m.unit }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "description", + |m: &MetricDescriptor| { &m.description }, + |m: &mut MetricDescriptor| { &mut m.description }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "display_name", + |m: &MetricDescriptor| { &m.display_name }, + |m: &mut MetricDescriptor| { &mut m.display_name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, metric_descriptor::MetricDescriptorMetadata>( + "metadata", + |m: &MetricDescriptor| { &m.metadata }, + |m: &mut MetricDescriptor| { &mut m.metadata }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "launch_stage", + |m: &MetricDescriptor| { &m.launch_stage }, + |m: &mut MetricDescriptor| { &mut m.launch_stage }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "monitored_resource_types", + |m: &MetricDescriptor| { &m.monitored_resource_types }, + |m: &mut MetricDescriptor| { &mut m.monitored_resource_types }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MetricDescriptor", + fields, + oneofs, + ) } } impl ::protobuf::Message for MetricDescriptor { + const NAME: &'static str = "MetricDescriptor"; + fn is_initialized(&self) -> bool { - for v in &self.labels { - if !v.is_initialized() { - return false; - } - }; - for v in &self.metadata { - 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)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.name = is.read_string()?; }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?; + 66 => { + self.type_ = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.labels)?; + 18 => { + self.labels.push(is.read_message()?); }, - 3 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.metric_kind, 3, &mut self.unknown_fields)? + 24 => { + self.metric_kind = is.read_enum_or_unknown()?; }, - 4 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.value_type, 4, &mut self.unknown_fields)? + 32 => { + self.value_type = is.read_enum_or_unknown()?; }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.unit)?; + 42 => { + self.unit = is.read_string()?; }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; + 50 => { + self.description = is.read_string()?; }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.display_name)?; + 58 => { + self.display_name = is.read_string()?; }, - 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.metadata)?; + 82 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.metadata)?; }, - 12 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.launch_stage, 12, &mut self.unknown_fields)? + 96 => { + self.launch_stage = is.read_enum_or_unknown()?; }, - 13 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.monitored_resource_types)?; + 106 => { + self.monitored_resource_types.push(is.read_string()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -374,23 +214,23 @@ impl ::protobuf::Message for MetricDescriptor { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.name); } - if !self.field_type.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.field_type); + if !self.type_.is_empty() { + my_size += ::protobuf::rt::string_size(8, &self.type_); } for value in &self.labels { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - if self.metric_kind != MetricDescriptor_MetricKind::METRIC_KIND_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(3, self.metric_kind); + if self.metric_kind != ::protobuf::EnumOrUnknown::new(metric_descriptor::MetricKind::METRIC_KIND_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(3, self.metric_kind.value()); } - if self.value_type != MetricDescriptor_ValueType::VALUE_TYPE_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(4, self.value_type); + if self.value_type != ::protobuf::EnumOrUnknown::new(metric_descriptor::ValueType::VALUE_TYPE_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(4, self.value_type.value()); } if !self.unit.is_empty() { my_size += ::protobuf::rt::string_size(5, &self.unit); @@ -401,38 +241,36 @@ impl ::protobuf::Message for MetricDescriptor { if !self.display_name.is_empty() { my_size += ::protobuf::rt::string_size(7, &self.display_name); } - if let Some(ref v) = self.metadata.as_ref() { + if let Some(v) = self.metadata.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - if self.launch_stage != super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(12, self.launch_stage); + if self.launch_stage != ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(12, self.launch_stage.value()); } for value in &self.monitored_resource_types { my_size += ::protobuf::rt::string_size(13, &value); }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.name.is_empty() { os.write_string(1, &self.name)?; } - if !self.field_type.is_empty() { - os.write_string(8, &self.field_type)?; + if !self.type_.is_empty() { + os.write_string(8, &self.type_)?; } for v in &self.labels { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }; - if self.metric_kind != MetricDescriptor_MetricKind::METRIC_KIND_UNSPECIFIED { - os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.metric_kind))?; + if self.metric_kind != ::protobuf::EnumOrUnknown::new(metric_descriptor::MetricKind::METRIC_KIND_UNSPECIFIED) { + os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.metric_kind))?; } - if self.value_type != MetricDescriptor_ValueType::VALUE_TYPE_UNSPECIFIED { - os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.value_type))?; + if self.value_type != ::protobuf::EnumOrUnknown::new(metric_descriptor::ValueType::VALUE_TYPE_UNSPECIFIED) { + os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.value_type))?; } if !self.unit.is_empty() { os.write_string(5, &self.unit)?; @@ -443,544 +281,535 @@ impl ::protobuf::Message for MetricDescriptor { if !self.display_name.is_empty() { os.write_string(7, &self.display_name)?; } - if let Some(ref v) = self.metadata.as_ref() { - os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + if let Some(v) = self.metadata.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; } - if self.launch_stage != super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED { - os.write_enum(12, ::protobuf::ProtobufEnum::value(&self.launch_stage))?; + if self.launch_stage != ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED) { + os.write_enum(12, ::protobuf::EnumOrUnknown::value(&self.launch_stage))?; } for v in &self.monitored_resource_types { os.write_string(13, &v)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> MetricDescriptor { MetricDescriptor::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &MetricDescriptor| { &m.name }, - |m: &mut MetricDescriptor| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &MetricDescriptor| { &m.field_type }, - |m: &mut MetricDescriptor| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "labels", - |m: &MetricDescriptor| { &m.labels }, - |m: &mut MetricDescriptor| { &mut m.labels }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "metric_kind", - |m: &MetricDescriptor| { &m.metric_kind }, - |m: &mut MetricDescriptor| { &mut m.metric_kind }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "value_type", - |m: &MetricDescriptor| { &m.value_type }, - |m: &mut MetricDescriptor| { &mut m.value_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "unit", - |m: &MetricDescriptor| { &m.unit }, - |m: &mut MetricDescriptor| { &mut m.unit }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &MetricDescriptor| { &m.description }, - |m: &mut MetricDescriptor| { &mut m.description }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "display_name", - |m: &MetricDescriptor| { &m.display_name }, - |m: &mut MetricDescriptor| { &mut m.display_name }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "metadata", - |m: &MetricDescriptor| { &m.metadata }, - |m: &mut MetricDescriptor| { &mut m.metadata }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "launch_stage", - |m: &MetricDescriptor| { &m.launch_stage }, - |m: &mut MetricDescriptor| { &mut m.launch_stage }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "monitored_resource_types", - |m: &MetricDescriptor| { &m.monitored_resource_types }, - |m: &mut MetricDescriptor| { &mut m.monitored_resource_types }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MetricDescriptor", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static MetricDescriptor { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MetricDescriptor::new) - } -} - -impl ::protobuf::Clear for MetricDescriptor { fn clear(&mut self) { self.name.clear(); - self.field_type.clear(); + self.type_.clear(); self.labels.clear(); - self.metric_kind = MetricDescriptor_MetricKind::METRIC_KIND_UNSPECIFIED; - self.value_type = MetricDescriptor_ValueType::VALUE_TYPE_UNSPECIFIED; + self.metric_kind = ::protobuf::EnumOrUnknown::new(metric_descriptor::MetricKind::METRIC_KIND_UNSPECIFIED); + self.value_type = ::protobuf::EnumOrUnknown::new(metric_descriptor::ValueType::VALUE_TYPE_UNSPECIFIED); self.unit.clear(); self.description.clear(); self.display_name.clear(); self.metadata.clear(); - self.launch_stage = super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED; + self.launch_stage = ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED); self.monitored_resource_types.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); } -} -impl ::std::fmt::Debug for MetricDescriptor { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + fn default_instance() -> &'static MetricDescriptor { + static instance: MetricDescriptor = MetricDescriptor { + name: ::std::string::String::new(), + type_: ::std::string::String::new(), + labels: ::std::vec::Vec::new(), + metric_kind: ::protobuf::EnumOrUnknown::from_i32(0), + value_type: ::protobuf::EnumOrUnknown::from_i32(0), + unit: ::std::string::String::new(), + description: ::std::string::String::new(), + display_name: ::std::string::String::new(), + metadata: ::protobuf::MessageField::none(), + launch_stage: ::protobuf::EnumOrUnknown::from_i32(0), + monitored_resource_types: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::reflect::ProtobufValue for MetricDescriptor { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) +impl ::protobuf::MessageFull for MetricDescriptor { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MetricDescriptor").unwrap()).clone() } } -#[derive(PartialEq,Clone,Default)] -pub struct MetricDescriptor_MetricDescriptorMetadata { - // message fields - pub launch_stage: super::launch_stage::LaunchStage, - pub sample_period: ::protobuf::SingularPtrField<::protobuf::well_known_types::Duration>, - pub ingest_delay: ::protobuf::SingularPtrField<::protobuf::well_known_types::Duration>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MetricDescriptor_MetricDescriptorMetadata { - fn default() -> &'a MetricDescriptor_MetricDescriptorMetadata { - ::default_instance() +impl ::std::fmt::Display for MetricDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) } } -impl MetricDescriptor_MetricDescriptorMetadata { - pub fn new() -> MetricDescriptor_MetricDescriptorMetadata { - ::std::default::Default::default() - } - - // .google.api.LaunchStage launch_stage = 1; - - - pub fn get_launch_stage(&self) -> super::launch_stage::LaunchStage { - self.launch_stage - } - pub fn clear_launch_stage(&mut self) { - self.launch_stage = super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_launch_stage(&mut self, v: super::launch_stage::LaunchStage) { - self.launch_stage = v; - } - - // .google.protobuf.Duration sample_period = 2; - - - pub fn get_sample_period(&self) -> &::protobuf::well_known_types::Duration { - self.sample_period.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Duration as ::protobuf::Message>::default_instance()) - } - pub fn clear_sample_period(&mut self) { - self.sample_period.clear(); - } - - pub fn has_sample_period(&self) -> bool { - self.sample_period.is_some() - } - - // Param is passed by value, moved - pub fn set_sample_period(&mut self, v: ::protobuf::well_known_types::Duration) { - self.sample_period = ::protobuf::SingularPtrField::some(v); - } +impl ::protobuf::reflect::ProtobufValue for MetricDescriptor { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sample_period(&mut self) -> &mut ::protobuf::well_known_types::Duration { - if self.sample_period.is_none() { - self.sample_period.set_default(); +/// Nested message and enums of message `MetricDescriptor` +pub mod metric_descriptor { + /// Additional annotations that can be used to guide the usage of a metric. + // @@protoc_insertion_point(message:google.api.MetricDescriptor.MetricDescriptorMetadata) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct MetricDescriptorMetadata { + // message fields + /// Deprecated. Must use the + /// [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage] + /// instead. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage) + pub launch_stage: ::protobuf::EnumOrUnknown, + /// The sampling period of metric data points. For metrics which are written + /// periodically, consecutive data points are stored at this time interval, + /// excluding data loss due to errors. Metrics with a higher granularity have + /// a smaller sampling period. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.MetricDescriptorMetadata.sample_period) + pub sample_period: ::protobuf::MessageField<::protobuf::well_known_types::duration::Duration>, + /// The delay of data points caused by ingestion. Data points older than this + /// age are guaranteed to be ingested and available to be read, excluding + /// data loss due to errors. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.MetricDescriptorMetadata.ingest_delay) + pub ingest_delay: ::protobuf::MessageField<::protobuf::well_known_types::duration::Duration>, + /// The scope of the timeseries data of the metric. + // @@protoc_insertion_point(field:google.api.MetricDescriptor.MetricDescriptorMetadata.time_series_resource_hierarchy_level) + pub time_series_resource_hierarchy_level: ::std::vec::Vec<::protobuf::EnumOrUnknown>, + // special fields + // @@protoc_insertion_point(special_field:google.api.MetricDescriptor.MetricDescriptorMetadata.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a MetricDescriptorMetadata { + fn default() -> &'a MetricDescriptorMetadata { + ::default_instance() } - self.sample_period.as_mut().unwrap() } - // Take field - pub fn take_sample_period(&mut self) -> ::protobuf::well_known_types::Duration { - self.sample_period.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new()) - } - - // .google.protobuf.Duration ingest_delay = 3; - - - pub fn get_ingest_delay(&self) -> &::protobuf::well_known_types::Duration { - self.ingest_delay.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Duration as ::protobuf::Message>::default_instance()) - } - pub fn clear_ingest_delay(&mut self) { - self.ingest_delay.clear(); - } + impl MetricDescriptorMetadata { + pub fn new() -> MetricDescriptorMetadata { + ::std::default::Default::default() + } - pub fn has_ingest_delay(&self) -> bool { - self.ingest_delay.is_some() + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(4); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "launch_stage", + |m: &MetricDescriptorMetadata| { &m.launch_stage }, + |m: &mut MetricDescriptorMetadata| { &mut m.launch_stage }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::duration::Duration>( + "sample_period", + |m: &MetricDescriptorMetadata| { &m.sample_period }, + |m: &mut MetricDescriptorMetadata| { &mut m.sample_period }, + )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::duration::Duration>( + "ingest_delay", + |m: &MetricDescriptorMetadata| { &m.ingest_delay }, + |m: &mut MetricDescriptorMetadata| { &mut m.ingest_delay }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "time_series_resource_hierarchy_level", + |m: &MetricDescriptorMetadata| { &m.time_series_resource_hierarchy_level }, + |m: &mut MetricDescriptorMetadata| { &mut m.time_series_resource_hierarchy_level }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MetricDescriptor.MetricDescriptorMetadata", + fields, + oneofs, + ) + } } - // Param is passed by value, moved - pub fn set_ingest_delay(&mut self, v: ::protobuf::well_known_types::Duration) { - self.ingest_delay = ::protobuf::SingularPtrField::some(v); - } + impl ::protobuf::Message for MetricDescriptorMetadata { + const NAME: &'static str = "MetricDescriptorMetadata"; - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ingest_delay(&mut self) -> &mut ::protobuf::well_known_types::Duration { - if self.ingest_delay.is_none() { - self.ingest_delay.set_default(); + fn is_initialized(&self) -> bool { + true } - self.ingest_delay.as_mut().unwrap() - } - // Take field - pub fn take_ingest_delay(&mut self) -> ::protobuf::well_known_types::Duration { - self.ingest_delay.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new()) - } -} + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.launch_stage = is.read_enum_or_unknown()?; + }, + 18 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.sample_period)?; + }, + 26 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.ingest_delay)?; + }, + 32 => { + self.time_series_resource_hierarchy_level.push(is.read_enum_or_unknown()?); + }, + 34 => { + ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.time_series_resource_hierarchy_level)? + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } -impl ::protobuf::Message for MetricDescriptor_MetricDescriptorMetadata { - fn is_initialized(&self) -> bool { - for v in &self.sample_period { - if !v.is_initialized() { - return false; + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if self.launch_stage != ::protobuf::EnumOrUnknown::new(super::super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(1, self.launch_stage.value()); } - }; - for v in &self.ingest_delay { - if !v.is_initialized() { - return false; + if let Some(v) = self.sample_period.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - }; - 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.launch_stage, 1, &mut self.unknown_fields)? - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sample_period)?; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ingest_delay)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + if let Some(v) = self.ingest_delay.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } + for value in &self.time_series_resource_hierarchy_level { + my_size += ::protobuf::rt::int32_size(4, value.value()); }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size } - ::std::result::Result::Ok(()) - } - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.launch_stage != super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(1, self.launch_stage); + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if self.launch_stage != ::protobuf::EnumOrUnknown::new(super::super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED) { + os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.launch_stage))?; + } + if let Some(v) = self.sample_period.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; + } + if let Some(v) = self.ingest_delay.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + } + for v in &self.time_series_resource_hierarchy_level { + os.write_enum(4, ::protobuf::EnumOrUnknown::value(v))?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) } - if let Some(ref v) = self.sample_period.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - if let Some(ref v) = self.ingest_delay.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } - 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.launch_stage != super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED { - os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.launch_stage))?; + fn new() -> MetricDescriptorMetadata { + MetricDescriptorMetadata::new() } - if let Some(ref v) = self.sample_period.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)?; + + fn clear(&mut self) { + self.launch_stage = ::protobuf::EnumOrUnknown::new(super::super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED); + self.sample_period.clear(); + self.ingest_delay.clear(); + self.time_series_resource_hierarchy_level.clear(); + self.special_fields.clear(); } - if let Some(ref v) = self.ingest_delay.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)?; + + fn default_instance() -> &'static MetricDescriptorMetadata { + static instance: MetricDescriptorMetadata = MetricDescriptorMetadata { + launch_stage: ::protobuf::EnumOrUnknown::from_i32(0), + sample_period: ::protobuf::MessageField::none(), + ingest_delay: ::protobuf::MessageField::none(), + time_series_resource_hierarchy_level: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + impl ::protobuf::MessageFull for MetricDescriptorMetadata { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("MetricDescriptor.MetricDescriptorMetadata").unwrap()).clone() + } } - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields + impl ::std::fmt::Display for MetricDescriptorMetadata { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } + impl ::protobuf::reflect::ProtobufValue for MetricDescriptorMetadata { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; + } + + /// Nested message and enums of message `MetricDescriptorMetadata` + pub mod metric_descriptor_metadata { + /// The resource hierarchy level of the timeseries data of a metric. + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel) + pub enum TimeSeriesResourceHierarchyLevel { + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel.TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED) + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel.PROJECT) + PROJECT = 1, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel.ORGANIZATION) + ORGANIZATION = 2, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel.FOLDER) + FOLDER = 3, + } - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } + impl ::protobuf::Enum for TimeSeriesResourceHierarchyLevel { + const NAME: &'static str = "TimeSeriesResourceHierarchyLevel"; - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } + fn value(&self) -> i32 { + *self as i32 + } - fn new() -> MetricDescriptor_MetricDescriptorMetadata { - MetricDescriptor_MetricDescriptorMetadata::new() - } + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(TimeSeriesResourceHierarchyLevel::TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED), + 1 => ::std::option::Option::Some(TimeSeriesResourceHierarchyLevel::PROJECT), + 2 => ::std::option::Option::Some(TimeSeriesResourceHierarchyLevel::ORGANIZATION), + 3 => ::std::option::Option::Some(TimeSeriesResourceHierarchyLevel::FOLDER), + _ => ::std::option::Option::None + } + } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "launch_stage", - |m: &MetricDescriptor_MetricDescriptorMetadata| { &m.launch_stage }, - |m: &mut MetricDescriptor_MetricDescriptorMetadata| { &mut m.launch_stage }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>( - "sample_period", - |m: &MetricDescriptor_MetricDescriptorMetadata| { &m.sample_period }, - |m: &mut MetricDescriptor_MetricDescriptorMetadata| { &mut m.sample_period }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>( - "ingest_delay", - |m: &MetricDescriptor_MetricDescriptorMetadata| { &m.ingest_delay }, - |m: &mut MetricDescriptor_MetricDescriptorMetadata| { &mut m.ingest_delay }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MetricDescriptor.MetricDescriptorMetadata", - fields, - file_descriptor_proto() - ) - }) - } + fn from_str(str: &str) -> ::std::option::Option { + match str { + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" => ::std::option::Option::Some(TimeSeriesResourceHierarchyLevel::TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED), + "PROJECT" => ::std::option::Option::Some(TimeSeriesResourceHierarchyLevel::PROJECT), + "ORGANIZATION" => ::std::option::Option::Some(TimeSeriesResourceHierarchyLevel::ORGANIZATION), + "FOLDER" => ::std::option::Option::Some(TimeSeriesResourceHierarchyLevel::FOLDER), + _ => ::std::option::Option::None + } + } - fn default_instance() -> &'static MetricDescriptor_MetricDescriptorMetadata { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MetricDescriptor_MetricDescriptorMetadata::new) - } -} + const VALUES: &'static [TimeSeriesResourceHierarchyLevel] = &[ + TimeSeriesResourceHierarchyLevel::TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED, + TimeSeriesResourceHierarchyLevel::PROJECT, + TimeSeriesResourceHierarchyLevel::ORGANIZATION, + TimeSeriesResourceHierarchyLevel::FOLDER, + ]; + } -impl ::protobuf::Clear for MetricDescriptor_MetricDescriptorMetadata { - fn clear(&mut self) { - self.launch_stage = super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED; - self.sample_period.clear(); - self.ingest_delay.clear(); - self.unknown_fields.clear(); - } -} + impl ::protobuf::EnumFull for TimeSeriesResourceHierarchyLevel { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::super::file_descriptor().enum_by_package_relative_name("MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel").unwrap()).clone() + } -impl ::std::fmt::Debug for MetricDescriptor_MetricDescriptorMetadata { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } + } + + impl ::std::default::Default for TimeSeriesResourceHierarchyLevel { + fn default() -> Self { + TimeSeriesResourceHierarchyLevel::TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED + } + } + + impl TimeSeriesResourceHierarchyLevel { + pub(in super::super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel") + } + } } -} -impl ::protobuf::reflect::ProtobufValue for MetricDescriptor_MetricDescriptorMetadata { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) + /// The kind of measurement. It describes how the data is reported. + /// For information on setting the start time and end time based on + /// the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.MetricDescriptor.MetricKind) + pub enum MetricKind { + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED) + METRIC_KIND_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.MetricKind.GAUGE) + GAUGE = 1, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.MetricKind.DELTA) + DELTA = 2, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.MetricKind.CUMULATIVE) + CUMULATIVE = 3, } -} -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum MetricDescriptor_MetricKind { - METRIC_KIND_UNSPECIFIED = 0, - GAUGE = 1, - DELTA = 2, - CUMULATIVE = 3, -} + impl ::protobuf::Enum for MetricKind { + const NAME: &'static str = "MetricKind"; -impl ::protobuf::ProtobufEnum for MetricDescriptor_MetricKind { - fn value(&self) -> i32 { - *self as i32 - } + fn value(&self) -> i32 { + *self as i32 + } - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(MetricDescriptor_MetricKind::METRIC_KIND_UNSPECIFIED), - 1 => ::std::option::Option::Some(MetricDescriptor_MetricKind::GAUGE), - 2 => ::std::option::Option::Some(MetricDescriptor_MetricKind::DELTA), - 3 => ::std::option::Option::Some(MetricDescriptor_MetricKind::CUMULATIVE), - _ => ::std::option::Option::None + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(MetricKind::METRIC_KIND_UNSPECIFIED), + 1 => ::std::option::Option::Some(MetricKind::GAUGE), + 2 => ::std::option::Option::Some(MetricKind::DELTA), + 3 => ::std::option::Option::Some(MetricKind::CUMULATIVE), + _ => ::std::option::Option::None + } + } + + fn from_str(str: &str) -> ::std::option::Option { + match str { + "METRIC_KIND_UNSPECIFIED" => ::std::option::Option::Some(MetricKind::METRIC_KIND_UNSPECIFIED), + "GAUGE" => ::std::option::Option::Some(MetricKind::GAUGE), + "DELTA" => ::std::option::Option::Some(MetricKind::DELTA), + "CUMULATIVE" => ::std::option::Option::Some(MetricKind::CUMULATIVE), + _ => ::std::option::Option::None + } } - } - fn values() -> &'static [Self] { - static values: &'static [MetricDescriptor_MetricKind] = &[ - MetricDescriptor_MetricKind::METRIC_KIND_UNSPECIFIED, - MetricDescriptor_MetricKind::GAUGE, - MetricDescriptor_MetricKind::DELTA, - MetricDescriptor_MetricKind::CUMULATIVE, + const VALUES: &'static [MetricKind] = &[ + MetricKind::METRIC_KIND_UNSPECIFIED, + MetricKind::GAUGE, + MetricKind::DELTA, + MetricKind::CUMULATIVE, ]; - values } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("MetricDescriptor.MetricKind", file_descriptor_proto()) - }) - } -} + impl ::protobuf::EnumFull for MetricKind { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("MetricDescriptor.MetricKind").unwrap()).clone() + } -impl ::std::marker::Copy for MetricDescriptor_MetricKind { -} + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } + } -impl ::std::default::Default for MetricDescriptor_MetricKind { - fn default() -> Self { - MetricDescriptor_MetricKind::METRIC_KIND_UNSPECIFIED + impl ::std::default::Default for MetricKind { + fn default() -> Self { + MetricKind::METRIC_KIND_UNSPECIFIED + } } -} -impl ::protobuf::reflect::ProtobufValue for MetricDescriptor_MetricKind { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + impl MetricKind { + pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("MetricDescriptor.MetricKind") + } } -} -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum MetricDescriptor_ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - BOOL = 1, - INT64 = 2, - DOUBLE = 3, - STRING = 4, - DISTRIBUTION = 5, - MONEY = 6, -} + /// The value type of a metric. + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.MetricDescriptor.ValueType) + pub enum ValueType { + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED) + VALUE_TYPE_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.ValueType.BOOL) + BOOL = 1, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.ValueType.INT64) + INT64 = 2, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.ValueType.DOUBLE) + DOUBLE = 3, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.ValueType.STRING) + STRING = 4, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.ValueType.DISTRIBUTION) + DISTRIBUTION = 5, + // @@protoc_insertion_point(enum_value:google.api.MetricDescriptor.ValueType.MONEY) + MONEY = 6, + } + + impl ::protobuf::Enum for ValueType { + const NAME: &'static str = "ValueType"; + + fn value(&self) -> i32 { + *self as i32 + } -impl ::protobuf::ProtobufEnum for MetricDescriptor_ValueType { - fn value(&self) -> i32 { - *self as i32 - } + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(ValueType::VALUE_TYPE_UNSPECIFIED), + 1 => ::std::option::Option::Some(ValueType::BOOL), + 2 => ::std::option::Option::Some(ValueType::INT64), + 3 => ::std::option::Option::Some(ValueType::DOUBLE), + 4 => ::std::option::Option::Some(ValueType::STRING), + 5 => ::std::option::Option::Some(ValueType::DISTRIBUTION), + 6 => ::std::option::Option::Some(ValueType::MONEY), + _ => ::std::option::Option::None + } + } - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(MetricDescriptor_ValueType::VALUE_TYPE_UNSPECIFIED), - 1 => ::std::option::Option::Some(MetricDescriptor_ValueType::BOOL), - 2 => ::std::option::Option::Some(MetricDescriptor_ValueType::INT64), - 3 => ::std::option::Option::Some(MetricDescriptor_ValueType::DOUBLE), - 4 => ::std::option::Option::Some(MetricDescriptor_ValueType::STRING), - 5 => ::std::option::Option::Some(MetricDescriptor_ValueType::DISTRIBUTION), - 6 => ::std::option::Option::Some(MetricDescriptor_ValueType::MONEY), - _ => ::std::option::Option::None + fn from_str(str: &str) -> ::std::option::Option { + match str { + "VALUE_TYPE_UNSPECIFIED" => ::std::option::Option::Some(ValueType::VALUE_TYPE_UNSPECIFIED), + "BOOL" => ::std::option::Option::Some(ValueType::BOOL), + "INT64" => ::std::option::Option::Some(ValueType::INT64), + "DOUBLE" => ::std::option::Option::Some(ValueType::DOUBLE), + "STRING" => ::std::option::Option::Some(ValueType::STRING), + "DISTRIBUTION" => ::std::option::Option::Some(ValueType::DISTRIBUTION), + "MONEY" => ::std::option::Option::Some(ValueType::MONEY), + _ => ::std::option::Option::None + } } - } - fn values() -> &'static [Self] { - static values: &'static [MetricDescriptor_ValueType] = &[ - MetricDescriptor_ValueType::VALUE_TYPE_UNSPECIFIED, - MetricDescriptor_ValueType::BOOL, - MetricDescriptor_ValueType::INT64, - MetricDescriptor_ValueType::DOUBLE, - MetricDescriptor_ValueType::STRING, - MetricDescriptor_ValueType::DISTRIBUTION, - MetricDescriptor_ValueType::MONEY, + const VALUES: &'static [ValueType] = &[ + ValueType::VALUE_TYPE_UNSPECIFIED, + ValueType::BOOL, + ValueType::INT64, + ValueType::DOUBLE, + ValueType::STRING, + ValueType::DISTRIBUTION, + ValueType::MONEY, ]; - values } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("MetricDescriptor.ValueType", file_descriptor_proto()) - }) - } -} + impl ::protobuf::EnumFull for ValueType { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("MetricDescriptor.ValueType").unwrap()).clone() + } -impl ::std::marker::Copy for MetricDescriptor_ValueType { -} + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } + } -impl ::std::default::Default for MetricDescriptor_ValueType { - fn default() -> Self { - MetricDescriptor_ValueType::VALUE_TYPE_UNSPECIFIED + impl ::std::default::Default for ValueType { + fn default() -> Self { + ValueType::VALUE_TYPE_UNSPECIFIED + } } -} -impl ::protobuf::reflect::ProtobufValue for MetricDescriptor_ValueType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + impl ValueType { + pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("MetricDescriptor.ValueType") + } } } -#[derive(PartialEq,Clone,Default)] +/// A specific metric, identified by specifying values for all of the +/// labels of a [`MetricDescriptor`][google.api.MetricDescriptor]. +// @@protoc_insertion_point(message:google.api.Metric) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Metric { // message fields - pub field_type: ::std::string::String, + /// An existing metric type, see + /// [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example, + /// `custom.googleapis.com/invoice/paid/amount`. + // @@protoc_insertion_point(field:google.api.Metric.type) + pub type_: ::std::string::String, + /// The set of label values that uniquely identify this metric. All + /// labels listed in the `MetricDescriptor` must be assigned values. + // @@protoc_insertion_point(field:google.api.Metric.labels) pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Metric.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Metric { @@ -994,75 +823,57 @@ impl Metric { ::std::default::Default::default() } - // string type = 3; - - - pub fn get_field_type(&self) -> &str { - &self.field_type - } - pub fn clear_field_type(&mut self) { - self.field_type.clear(); - } - - // Param is passed by value, moved - pub fn set_field_type(&mut self, v: ::std::string::String) { - self.field_type = 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 ::std::string::String { - &mut self.field_type - } - - // Take field - pub fn take_field_type(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.field_type, ::std::string::String::new()) - } - - // repeated .google.api.Metric.LabelsEntry labels = 2; - - - pub fn get_labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.labels - } - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "type", + |m: &Metric| { &m.type_ }, + |m: &mut Metric| { &mut m.type_ }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "labels", + |m: &Metric| { &m.labels }, + |m: &mut Metric| { &mut m.labels }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Metric", + fields, + oneofs, + ) } } impl ::protobuf::Message for Metric { + const NAME: &'static str = "Metric"; + 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 { - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 26 => { + self.type_ = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?; + 18 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 18 => value = is.read_string()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.labels.insert(key, value); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -1071,110 +882,86 @@ impl ::protobuf::Message for Metric { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if !self.field_type.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.field_type); + if !self.type_.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.type_); } - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels); - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + for (k, v) in &self.labels { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.field_type.is_empty() { - os.write_string(3, &self.field_type)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.type_.is_empty() { + os.write_string(3, &self.type_)?; } - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels, os)?; - os.write_unknown_fields(self.get_unknown_fields())?; + for (k, v) in &self.labels { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + os.write_raw_varint32(18)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + os.write_string(2, &v)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Metric { Metric::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &Metric| { &m.field_type }, - |m: &mut Metric| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>( - "labels", - |m: &Metric| { &m.labels }, - |m: &mut Metric| { &mut m.labels }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Metric", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.type_.clear(); + self.labels.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Metric { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); instance.get(Metric::new) } } -impl ::protobuf::Clear for Metric { - fn clear(&mut self) { - self.field_type.clear(); - self.labels.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Metric { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Metric").unwrap()).clone() } } -impl ::std::fmt::Debug for Metric { +impl ::std::fmt::Display for Metric { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Metric { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x17google/api/metric.proto\x12\ngoogle.api\x1a\x16google/api/label.pr\ oto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x1egoogle/protobuf/duration\ - .proto\"\xc1\x07\n\x10MetricDescriptor\x12\x12\n\x04name\x18\x01\x20\x01\ - (\tR\x04name\x12\x12\n\x04type\x18\x08\x20\x01(\tR\x04type\x123\n\x06lab\ - els\x18\x02\x20\x03(\x0b2\x1b.google.api.LabelDescriptorR\x06labels\x12H\ + .proto\"\xf0\t\n\x10MetricDescriptor\x12\x12\n\x04name\x18\x01\x20\x01(\ + \tR\x04name\x12\x12\n\x04type\x18\x08\x20\x01(\tR\x04type\x123\n\x06labe\ + ls\x18\x02\x20\x03(\x0b2\x1b.google.api.LabelDescriptorR\x06labels\x12H\ \n\x0bmetric_kind\x18\x03\x20\x01(\x0e2'.google.api.MetricDescriptor.Met\ ricKindR\nmetricKind\x12E\n\nvalue_type\x18\x04\x20\x01(\x0e2&.google.ap\ i.MetricDescriptor.ValueTypeR\tvalueType\x12\x12\n\x04unit\x18\x05\x20\ @@ -1183,170 +970,197 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x08metadata\x18\n\x20\x01(\x0b25.google.api.MetricDescriptor.MetricDesc\ riptorMetadataR\x08metadata\x12:\n\x0claunch_stage\x18\x0c\x20\x01(\x0e2\ \x17.google.api.LaunchStageR\x0blaunchStage\x128\n\x18monitored_resource\ - _types\x18\r\x20\x03(\tR\x16monitoredResourceTypes\x1a\xd8\x01\n\x18Metr\ + _types\x18\r\x20\x03(\tR\x16monitoredResourceTypes\x1a\x87\x04\n\x18Metr\ icDescriptorMetadata\x12>\n\x0claunch_stage\x18\x01\x20\x01(\x0e2\x17.go\ ogle.api.LaunchStageR\x0blaunchStageB\x02\x18\x01\x12>\n\rsample_period\ \x18\x02\x20\x01(\x0b2\x19.google.protobuf.DurationR\x0csamplePeriod\x12\ <\n\x0cingest_delay\x18\x03\x20\x01(\x0b2\x19.google.protobuf.DurationR\ - \x0bingestDelay\"O\n\nMetricKind\x12\x1b\n\x17METRIC_KIND_UNSPECIFIED\ - \x10\0\x12\t\n\x05GAUGE\x10\x01\x12\t\n\x05DELTA\x10\x02\x12\x0e\n\nCUMU\ - LATIVE\x10\x03\"q\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\0\ - \x12\x08\n\x04BOOL\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06DOUBLE\ - \x10\x03\x12\n\n\x06STRING\x10\x04\x12\x10\n\x0cDISTRIBUTION\x10\x05\x12\ - \t\n\x05MONEY\x10\x06\"\x8f\x01\n\x06Metric\x12\x12\n\x04type\x18\x03\ - \x20\x01(\tR\x04type\x126\n\x06labels\x18\x02\x20\x03(\x0b2\x1e.google.a\ - pi.Metric.LabelsEntryR\x06labels\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\ - \x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05va\ - lue:\x028\x01B_\n\x0ecom.google.apiB\x0bMetricProtoP\x01Z7google.golang.\ - org/genproto/googleapis/api/metric;metric\xa2\x02\x04GAPIJ\xcdQ\n\x07\ - \x12\x05\x0e\0\x8b\x02\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\ - \x04\x20Copyright\x202023\x20Google\x20LLC\n\n\x20Licensed\x20under\x20t\ - he\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\ - \x20you\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20complian\ - ce\x20with\x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20\ - of\x20the\x20License\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/\ - licenses/LICENSE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20la\ - w\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\x13\n\t\n\x02\x03\0\x12\x03\x12\0\x20\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\0N\n\t\n\x02\x08\x0b\x12\x03\x16\0N\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\0\"\n\t\n\x02\x08$\x12\ - \x03\x1a\0\"\n\xbf\x01\n\x02\x04\0\x12\x05\x20\0\xfe\x01\x01\x1a\xb1\x01\ - \x20Defines\x20a\x20metric\x20type\x20and\x20its\x20schema.\x20Once\x20a\ - \x20metric\x20descriptor\x20is\x20created,\n\x20deleting\x20or\x20alteri\ - ng\x20it\x20stops\x20data\x20collection\x20and\x20makes\x20the\x20metric\ - \x20type's\n\x20existing\x20data\x20unusable.\n\n\n\n\n\x03\x04\0\x01\ - \x12\x03\x20\x08\x18\n\xd9\x01\n\x04\x04\0\x04\0\x12\x04$\x024\x03\x1a\ - \xca\x01\x20The\x20kind\x20of\x20measurement.\x20It\x20describes\x20how\ - \x20the\x20data\x20is\x20reported.\n\x20For\x20information\x20on\x20sett\ - ing\x20the\x20start\x20time\x20and\x20end\x20time\x20based\x20on\n\x20th\ - e\x20MetricKind,\x20see\x20[TimeInterval][google.monitoring.v3.TimeInter\ - val].\n\n\x0c\n\x05\x04\0\x04\0\x01\x12\x03$\x07\x11\n/\n\x06\x04\0\x04\ - \0\x02\0\x12\x03&\x04\x20\x1a\x20\x20Do\x20not\x20use\x20this\x20default\ - \x20value.\n\n\x0e\n\x07\x04\0\x04\0\x02\0\x01\x12\x03&\x04\x1b\n\x0e\n\ - \x07\x04\0\x04\0\x02\0\x02\x12\x03&\x1e\x1f\n9\n\x06\x04\0\x04\0\x02\x01\ - \x12\x03)\x04\x0e\x1a*\x20An\x20instantaneous\x20measurement\x20of\x20a\ - \x20value.\n\n\x0e\n\x07\x04\0\x04\0\x02\x01\x01\x12\x03)\x04\t\n\x0e\n\ - \x07\x04\0\x04\0\x02\x01\x02\x12\x03)\x0c\r\n>\n\x06\x04\0\x04\0\x02\x02\ - \x12\x03,\x04\x0e\x1a/\x20The\x20change\x20in\x20a\x20value\x20during\ - \x20a\x20time\x20interval.\n\n\x0e\n\x07\x04\0\x04\0\x02\x02\x01\x12\x03\ - ,\x04\t\n\x0e\n\x07\x04\0\x04\0\x02\x02\x02\x12\x03,\x0c\r\n\x8a\x02\n\ - \x06\x04\0\x04\0\x02\x03\x12\x033\x04\x13\x1a\xfa\x01\x20A\x20value\x20a\ - ccumulated\x20over\x20a\x20time\x20interval.\x20\x20Cumulative\n\x20meas\ - urements\x20in\x20a\x20time\x20series\x20should\x20have\x20the\x20same\ - \x20start\x20time\n\x20and\x20increasing\x20end\x20times,\x20until\x20an\ - \x20event\x20resets\x20the\x20cumulative\n\x20value\x20to\x20zero\x20and\ - \x20sets\x20a\x20new\x20start\x20time\x20for\x20the\x20following\n\x20po\ - ints.\n\n\x0e\n\x07\x04\0\x04\0\x02\x03\x01\x12\x033\x04\x0e\n\x0e\n\x07\ - \x04\0\x04\0\x02\x03\x02\x12\x033\x11\x12\n+\n\x04\x04\0\x04\x01\x12\x04\ - 7\x02N\x03\x1a\x1d\x20The\x20value\x20type\x20of\x20a\x20metric.\n\n\x0c\ - \n\x05\x04\0\x04\x01\x01\x12\x037\x07\x10\n/\n\x06\x04\0\x04\x01\x02\0\ - \x12\x039\x04\x1f\x1a\x20\x20Do\x20not\x20use\x20this\x20default\x20valu\ - e.\n\n\x0e\n\x07\x04\0\x04\x01\x02\0\x01\x12\x039\x04\x1a\n\x0e\n\x07\ - \x04\0\x04\x01\x02\0\x02\x12\x039\x1d\x1e\ni\n\x06\x04\0\x04\x01\x02\x01\ - \x12\x03=\x04\r\x1aZ\x20The\x20value\x20is\x20a\x20boolean.\n\x20This\ - \x20value\x20type\x20can\x20be\x20used\x20only\x20if\x20the\x20metric\ - \x20kind\x20is\x20`GAUGE`.\n\n\x0e\n\x07\x04\0\x04\x01\x02\x01\x01\x12\ - \x03=\x04\x08\n\x0e\n\x07\x04\0\x04\x01\x02\x01\x02\x12\x03=\x0b\x0c\n6\ - \n\x06\x04\0\x04\x01\x02\x02\x12\x03@\x04\x0e\x1a'\x20The\x20value\x20is\ - \x20a\x20signed\x2064-bit\x20integer.\n\n\x0e\n\x07\x04\0\x04\x01\x02\ - \x02\x01\x12\x03@\x04\t\n\x0e\n\x07\x04\0\x04\x01\x02\x02\x02\x12\x03@\ - \x0c\r\nG\n\x06\x04\0\x04\x01\x02\x03\x12\x03C\x04\x0f\x1a8\x20The\x20va\ - lue\x20is\x20a\x20double\x20precision\x20floating\x20point\x20number.\n\ - \n\x0e\n\x07\x04\0\x04\x01\x02\x03\x01\x12\x03C\x04\n\n\x0e\n\x07\x04\0\ - \x04\x01\x02\x03\x02\x12\x03C\r\x0e\nm\n\x06\x04\0\x04\x01\x02\x04\x12\ - \x03G\x04\x0f\x1a^\x20The\x20value\x20is\x20a\x20text\x20string.\n\x20Th\ - is\x20value\x20type\x20can\x20be\x20used\x20only\x20if\x20the\x20metric\ - \x20kind\x20is\x20`GAUGE`.\n\n\x0e\n\x07\x04\0\x04\x01\x02\x04\x01\x12\ - \x03G\x04\n\n\x0e\n\x07\x04\0\x04\x01\x02\x04\x02\x12\x03G\r\x0e\nJ\n\ - \x06\x04\0\x04\x01\x02\x05\x12\x03J\x04\x15\x1a;\x20The\x20value\x20is\ - \x20a\x20[`Distribution`][google.api.Distribution].\n\n\x0e\n\x07\x04\0\ - \x04\x01\x02\x05\x01\x12\x03J\x04\x10\n\x0e\n\x07\x04\0\x04\x01\x02\x05\ - \x02\x12\x03J\x13\x14\n$\n\x06\x04\0\x04\x01\x02\x06\x12\x03M\x04\x0e\ - \x1a\x15\x20The\x20value\x20is\x20money.\n\n\x0e\n\x07\x04\0\x04\x01\x02\ - \x06\x01\x12\x03M\x04\t\n\x0e\n\x07\x04\0\x04\x01\x02\x06\x02\x12\x03M\ - \x0c\r\nW\n\x04\x04\0\x03\0\x12\x04Q\x02a\x03\x1aI\x20Additional\x20anno\ - tations\x20that\x20can\x20be\x20used\x20to\x20guide\x20the\x20usage\x20o\ - f\x20a\x20metric.\n\n\x0c\n\x05\x04\0\x03\0\x01\x12\x03Q\n\"\n~\n\x06\ - \x04\0\x03\0\x02\0\x12\x03U\x045\x1ao\x20Deprecated.\x20Must\x20use\x20t\ - he\n\x20[MetricDescriptor.launch_stage][google.api.MetricDescriptor.laun\ - ch_stage]\n\x20instead.\n\n\x0e\n\x07\x04\0\x03\0\x02\0\x06\x12\x03U\x04\ - \x0f\n\x0e\n\x07\x04\0\x03\0\x02\0\x01\x12\x03U\x10\x1c\n\x0e\n\x07\x04\ - \0\x03\0\x02\0\x03\x12\x03U\x1f\x20\n\x0e\n\x07\x04\0\x03\0\x02\0\x08\ - \x12\x03U!4\n\x0f\n\x08\x04\0\x03\0\x02\0\x08\x03\x12\x03U\"3\n\x8a\x02\ - \n\x06\x04\0\x03\0\x02\x01\x12\x03[\x04/\x1a\xfa\x01\x20The\x20sampling\ + \x0bingestDelay\x12\xa6\x01\n$time_series_resource_hierarchy_level\x18\ + \x04\x20\x03(\x0e2V.google.api.MetricDescriptor.MetricDescriptorMetadata\ + .TimeSeriesResourceHierarchyLevelR\x20timeSeriesResourceHierarchyLevel\"\ + \x83\x01\n\x20TimeSeriesResourceHierarchyLevel\x124\n0TIME_SERIES_RESOUR\ + CE_HIERARCHY_LEVEL_UNSPECIFIED\x10\0\x12\x0b\n\x07PROJECT\x10\x01\x12\ + \x10\n\x0cORGANIZATION\x10\x02\x12\n\n\x06FOLDER\x10\x03\"O\n\nMetricKin\ + d\x12\x1b\n\x17METRIC_KIND_UNSPECIFIED\x10\0\x12\t\n\x05GAUGE\x10\x01\ + \x12\t\n\x05DELTA\x10\x02\x12\x0e\n\nCUMULATIVE\x10\x03\"q\n\tValueType\ + \x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\0\x12\x08\n\x04BOOL\x10\x01\x12\ + \t\n\x05INT64\x10\x02\x12\n\n\x06DOUBLE\x10\x03\x12\n\n\x06STRING\x10\ + \x04\x12\x10\n\x0cDISTRIBUTION\x10\x05\x12\t\n\x05MONEY\x10\x06\"\x8f\ + \x01\n\x06Metric\x12\x12\n\x04type\x18\x03\x20\x01(\tR\x04type\x126\n\ + \x06labels\x18\x02\x20\x03(\x0b2\x1e.google.api.Metric.LabelsEntryR\x06l\ + abels\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\ + \x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01B_\n\x0ecom.go\ + ogle.apiB\x0bMetricProtoP\x01Z7google.golang.org/genproto/googleapis/api\ + /metric;metric\xa2\x02\x04GAPIJ\xa3V\n\x07\x12\x05\x0e\0\x9e\x02\x01\n\ + \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\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\x13\n\t\n\x02\x03\0\ + \x12\x03\x12\0\x20\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\0N\n\t\n\x02\x08\x0b\x12\x03\ + \x16\0N\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\0\"\n\t\n\x02\x08$\x12\x03\x1a\0\"\n\xbf\x01\n\x02\x04\0\ + \x12\x05\x20\0\x91\x02\x01\x1a\xb1\x01\x20Defines\x20a\x20metric\x20type\ + \x20and\x20its\x20schema.\x20Once\x20a\x20metric\x20descriptor\x20is\x20\ + created,\n\x20deleting\x20or\x20altering\x20it\x20stops\x20data\x20colle\ + ction\x20and\x20makes\x20the\x20metric\x20type's\n\x20existing\x20data\ + \x20unusable.\n\n\n\n\n\x03\x04\0\x01\x12\x03\x20\x08\x18\n\xd9\x01\n\ + \x04\x04\0\x04\0\x12\x04$\x024\x03\x1a\xca\x01\x20The\x20kind\x20of\x20m\ + easurement.\x20It\x20describes\x20how\x20the\x20data\x20is\x20reported.\ + \n\x20For\x20information\x20on\x20setting\x20the\x20start\x20time\x20and\ + \x20end\x20time\x20based\x20on\n\x20the\x20MetricKind,\x20see\x20[TimeIn\ + terval][google.monitoring.v3.TimeInterval].\n\n\x0c\n\x05\x04\0\x04\0\ + \x01\x12\x03$\x07\x11\n/\n\x06\x04\0\x04\0\x02\0\x12\x03&\x04\x20\x1a\ + \x20\x20Do\x20not\x20use\x20this\x20default\x20value.\n\n\x0e\n\x07\x04\ + \0\x04\0\x02\0\x01\x12\x03&\x04\x1b\n\x0e\n\x07\x04\0\x04\0\x02\0\x02\ + \x12\x03&\x1e\x1f\n9\n\x06\x04\0\x04\0\x02\x01\x12\x03)\x04\x0e\x1a*\x20\ + An\x20instantaneous\x20measurement\x20of\x20a\x20value.\n\n\x0e\n\x07\ + \x04\0\x04\0\x02\x01\x01\x12\x03)\x04\t\n\x0e\n\x07\x04\0\x04\0\x02\x01\ + \x02\x12\x03)\x0c\r\n>\n\x06\x04\0\x04\0\x02\x02\x12\x03,\x04\x0e\x1a/\ + \x20The\x20change\x20in\x20a\x20value\x20during\x20a\x20time\x20interval\ + .\n\n\x0e\n\x07\x04\0\x04\0\x02\x02\x01\x12\x03,\x04\t\n\x0e\n\x07\x04\0\ + \x04\0\x02\x02\x02\x12\x03,\x0c\r\n\x8a\x02\n\x06\x04\0\x04\0\x02\x03\ + \x12\x033\x04\x13\x1a\xfa\x01\x20A\x20value\x20accumulated\x20over\x20a\ + \x20time\x20interval.\x20\x20Cumulative\n\x20measurements\x20in\x20a\x20\ + time\x20series\x20should\x20have\x20the\x20same\x20start\x20time\n\x20an\ + d\x20increasing\x20end\x20times,\x20until\x20an\x20event\x20resets\x20th\ + e\x20cumulative\n\x20value\x20to\x20zero\x20and\x20sets\x20a\x20new\x20s\ + tart\x20time\x20for\x20the\x20following\n\x20points.\n\n\x0e\n\x07\x04\0\ + \x04\0\x02\x03\x01\x12\x033\x04\x0e\n\x0e\n\x07\x04\0\x04\0\x02\x03\x02\ + \x12\x033\x11\x12\n+\n\x04\x04\0\x04\x01\x12\x047\x02N\x03\x1a\x1d\x20Th\ + e\x20value\x20type\x20of\x20a\x20metric.\n\n\x0c\n\x05\x04\0\x04\x01\x01\ + \x12\x037\x07\x10\n/\n\x06\x04\0\x04\x01\x02\0\x12\x039\x04\x1f\x1a\x20\ + \x20Do\x20not\x20use\x20this\x20default\x20value.\n\n\x0e\n\x07\x04\0\ + \x04\x01\x02\0\x01\x12\x039\x04\x1a\n\x0e\n\x07\x04\0\x04\x01\x02\0\x02\ + \x12\x039\x1d\x1e\ni\n\x06\x04\0\x04\x01\x02\x01\x12\x03=\x04\r\x1aZ\x20\ + The\x20value\x20is\x20a\x20boolean.\n\x20This\x20value\x20type\x20can\ + \x20be\x20used\x20only\x20if\x20the\x20metric\x20kind\x20is\x20`GAUGE`.\ + \n\n\x0e\n\x07\x04\0\x04\x01\x02\x01\x01\x12\x03=\x04\x08\n\x0e\n\x07\ + \x04\0\x04\x01\x02\x01\x02\x12\x03=\x0b\x0c\n6\n\x06\x04\0\x04\x01\x02\ + \x02\x12\x03@\x04\x0e\x1a'\x20The\x20value\x20is\x20a\x20signed\x2064-bi\ + t\x20integer.\n\n\x0e\n\x07\x04\0\x04\x01\x02\x02\x01\x12\x03@\x04\t\n\ + \x0e\n\x07\x04\0\x04\x01\x02\x02\x02\x12\x03@\x0c\r\nG\n\x06\x04\0\x04\ + \x01\x02\x03\x12\x03C\x04\x0f\x1a8\x20The\x20value\x20is\x20a\x20double\ + \x20precision\x20floating\x20point\x20number.\n\n\x0e\n\x07\x04\0\x04\ + \x01\x02\x03\x01\x12\x03C\x04\n\n\x0e\n\x07\x04\0\x04\x01\x02\x03\x02\ + \x12\x03C\r\x0e\nm\n\x06\x04\0\x04\x01\x02\x04\x12\x03G\x04\x0f\x1a^\x20\ + The\x20value\x20is\x20a\x20text\x20string.\n\x20This\x20value\x20type\ + \x20can\x20be\x20used\x20only\x20if\x20the\x20metric\x20kind\x20is\x20`G\ + AUGE`.\n\n\x0e\n\x07\x04\0\x04\x01\x02\x04\x01\x12\x03G\x04\n\n\x0e\n\ + \x07\x04\0\x04\x01\x02\x04\x02\x12\x03G\r\x0e\nJ\n\x06\x04\0\x04\x01\x02\ + \x05\x12\x03J\x04\x15\x1a;\x20The\x20value\x20is\x20a\x20[`Distribution`\ + ][google.api.Distribution].\n\n\x0e\n\x07\x04\0\x04\x01\x02\x05\x01\x12\ + \x03J\x04\x10\n\x0e\n\x07\x04\0\x04\x01\x02\x05\x02\x12\x03J\x13\x14\n$\ + \n\x06\x04\0\x04\x01\x02\x06\x12\x03M\x04\x0e\x1a\x15\x20The\x20value\ + \x20is\x20money.\n\n\x0e\n\x07\x04\0\x04\x01\x02\x06\x01\x12\x03M\x04\t\ + \n\x0e\n\x07\x04\0\x04\x01\x02\x06\x02\x12\x03M\x0c\r\nW\n\x04\x04\0\x03\ + \0\x12\x04Q\x02t\x03\x1aI\x20Additional\x20annotations\x20that\x20can\ + \x20be\x20used\x20to\x20guide\x20the\x20usage\x20of\x20a\x20metric.\n\n\ + \x0c\n\x05\x04\0\x03\0\x01\x12\x03Q\n\"\nR\n\x06\x04\0\x03\0\x04\0\x12\ + \x04S\x04_\x05\x1aB\x20The\x20resource\x20hierarchy\x20level\x20of\x20th\ + e\x20timeseries\x20data\x20of\x20a\x20metric.\n\n\x0e\n\x07\x04\0\x03\0\ + \x04\0\x01\x12\x03S\t)\n1\n\x08\x04\0\x03\0\x04\0\x02\0\x12\x03U\x06;\ + \x1a\x20\x20Do\x20not\x20use\x20this\x20default\x20value.\n\n\x10\n\t\ + \x04\0\x03\0\x04\0\x02\0\x01\x12\x03U\x066\n\x10\n\t\x04\0\x03\0\x04\0\ + \x02\0\x02\x12\x03U9:\n0\n\x08\x04\0\x03\0\x04\0\x02\x01\x12\x03X\x06\ + \x12\x1a\x1f\x20Scopes\x20a\x20metric\x20to\x20a\x20project.\n\n\x10\n\t\ + \x04\0\x03\0\x04\0\x02\x01\x01\x12\x03X\x06\r\n\x10\n\t\x04\0\x03\0\x04\ + \0\x02\x01\x02\x12\x03X\x10\x11\n6\n\x08\x04\0\x03\0\x04\0\x02\x02\x12\ + \x03[\x06\x17\x1a%\x20Scopes\x20a\x20metric\x20to\x20an\x20organization.\ + \n\n\x10\n\t\x04\0\x03\0\x04\0\x02\x02\x01\x12\x03[\x06\x12\n\x10\n\t\ + \x04\0\x03\0\x04\0\x02\x02\x02\x12\x03[\x15\x16\n/\n\x08\x04\0\x03\0\x04\ + \0\x02\x03\x12\x03^\x06\x11\x1a\x1e\x20Scopes\x20a\x20metric\x20to\x20a\ + \x20folder.\n\n\x10\n\t\x04\0\x03\0\x04\0\x02\x03\x01\x12\x03^\x06\x0c\n\ + \x10\n\t\x04\0\x03\0\x04\0\x02\x03\x02\x12\x03^\x0f\x10\n~\n\x06\x04\0\ + \x03\0\x02\0\x12\x03d\x045\x1ao\x20Deprecated.\x20Must\x20use\x20the\n\ + \x20[MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_s\ + tage]\n\x20instead.\n\n\x0e\n\x07\x04\0\x03\0\x02\0\x06\x12\x03d\x04\x0f\ + \n\x0e\n\x07\x04\0\x03\0\x02\0\x01\x12\x03d\x10\x1c\n\x0e\n\x07\x04\0\ + \x03\0\x02\0\x03\x12\x03d\x1f\x20\n\x0e\n\x07\x04\0\x03\0\x02\0\x08\x12\ + \x03d!4\n\x0f\n\x08\x04\0\x03\0\x02\0\x08\x03\x12\x03d\"3\n\x8a\x02\n\ + \x06\x04\0\x03\0\x02\x01\x12\x03j\x04/\x1a\xfa\x01\x20The\x20sampling\ \x20period\x20of\x20metric\x20data\x20points.\x20For\x20metrics\x20which\ \x20are\x20written\n\x20periodically,\x20consecutive\x20data\x20points\ \x20are\x20stored\x20at\x20this\x20time\x20interval,\n\x20excluding\x20d\ ata\x20loss\x20due\x20to\x20errors.\x20Metrics\x20with\x20a\x20higher\ \x20granularity\x20have\n\x20a\x20smaller\x20sampling\x20period.\n\n\x0e\ - \n\x07\x04\0\x03\0\x02\x01\x06\x12\x03[\x04\x1c\n\x0e\n\x07\x04\0\x03\0\ - \x02\x01\x01\x12\x03[\x1d*\n\x0e\n\x07\x04\0\x03\0\x02\x01\x03\x12\x03[-\ - .\n\xbc\x01\n\x06\x04\0\x03\0\x02\x02\x12\x03`\x04.\x1a\xac\x01\x20The\ + \n\x07\x04\0\x03\0\x02\x01\x06\x12\x03j\x04\x1c\n\x0e\n\x07\x04\0\x03\0\ + \x02\x01\x01\x12\x03j\x1d*\n\x0e\n\x07\x04\0\x03\0\x02\x01\x03\x12\x03j-\ + .\n\xbc\x01\n\x06\x04\0\x03\0\x02\x02\x12\x03o\x04.\x1a\xac\x01\x20The\ \x20delay\x20of\x20data\x20points\x20caused\x20by\x20ingestion.\x20Data\ \x20points\x20older\x20than\x20this\n\x20age\x20are\x20guaranteed\x20to\ \x20be\x20ingested\x20and\x20available\x20to\x20be\x20read,\x20excluding\ \n\x20data\x20loss\x20due\x20to\x20errors.\n\n\x0e\n\x07\x04\0\x03\0\x02\ - \x02\x06\x12\x03`\x04\x1c\n\x0e\n\x07\x04\0\x03\0\x02\x02\x01\x12\x03`\ - \x1d)\n\x0e\n\x07\x04\0\x03\0\x02\x02\x03\x12\x03`,-\n:\n\x04\x04\0\x02\ - \0\x12\x03d\x02\x12\x1a-\x20The\x20resource\x20name\x20of\x20the\x20metr\ - ic\x20descriptor.\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03d\x02\x08\n\x0c\n\ - \x05\x04\0\x02\0\x01\x12\x03d\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03d\ - \x10\x11\n\xa9\x03\n\x04\x04\0\x02\x01\x12\x03n\x02\x12\x1a\x9b\x03\x20T\ - he\x20metric\x20type,\x20including\x20its\x20DNS\x20name\x20prefix.\x20T\ - he\x20type\x20is\x20not\n\x20URL-encoded.\x20All\x20user-defined\x20metr\ - ic\x20types\x20have\x20the\x20DNS\x20name\n\x20`custom.googleapis.com`\ - \x20or\x20`external.googleapis.com`.\x20Metric\x20types\x20should\n\x20u\ - se\x20a\x20natural\x20hierarchical\x20grouping.\x20For\x20example:\n\n\ - \x20\x20\x20\x20\x20\"custom.googleapis.com/invoice/paid/amount\"\n\x20\ - \x20\x20\x20\x20\"external.googleapis.com/prometheus/up\"\n\x20\x20\x20\ - \x20\x20\"appengine.googleapis.com/http/server/response_latencies\"\n\n\ - \x0c\n\x05\x04\0\x02\x01\x05\x12\x03n\x02\x08\n\x0c\n\x05\x04\0\x02\x01\ - \x01\x12\x03n\t\r\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03n\x10\x11\n\xd5\ - \x02\n\x04\x04\0\x02\x02\x12\x03v\x02&\x1a\xc7\x02\x20The\x20set\x20of\ - \x20labels\x20that\x20can\x20be\x20used\x20to\x20describe\x20a\x20specif\ - ic\n\x20instance\x20of\x20this\x20metric\x20type.\x20For\x20example,\x20\ - the\n\x20`appengine.googleapis.com/http/server/response_latencies`\x20me\ - tric\n\x20type\x20has\x20a\x20label\x20for\x20the\x20HTTP\x20response\ - \x20code,\x20`response_code`,\x20so\n\x20you\x20can\x20look\x20at\x20lat\ - encies\x20for\x20successful\x20responses\x20or\x20just\n\x20for\x20respo\ - nses\x20that\x20failed.\n\n\x0c\n\x05\x04\0\x02\x02\x04\x12\x03v\x02\n\n\ - \x0c\n\x05\x04\0\x02\x02\x06\x12\x03v\x0b\x1a\n\x0c\n\x05\x04\0\x02\x02\ - \x01\x12\x03v\x1b!\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03v$%\n\xa6\x01\n\ - \x04\x04\0\x02\x03\x12\x03z\x02\x1d\x1a\x98\x01\x20Whether\x20the\x20met\ - ric\x20records\x20instantaneous\x20values,\x20changes\x20to\x20a\x20valu\ - e,\x20etc.\n\x20Some\x20combinations\x20of\x20`metric_kind`\x20and\x20`v\ - alue_type`\x20might\x20not\x20be\x20supported.\n\n\x0c\n\x05\x04\0\x02\ - \x03\x06\x12\x03z\x02\x0c\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03z\r\x18\n\ - \x0c\n\x05\x04\0\x02\x03\x03\x12\x03z\x1b\x1c\n\xa1\x01\n\x04\x04\0\x02\ - \x04\x12\x03~\x02\x1b\x1a\x93\x01\x20Whether\x20the\x20measurement\x20is\ - \x20an\x20integer,\x20a\x20floating-point\x20number,\x20etc.\n\x20Some\ - \x20combinations\x20of\x20`metric_kind`\x20and\x20`value_type`\x20might\ - \x20not\x20be\x20supported.\n\n\x0c\n\x05\x04\0\x02\x04\x06\x12\x03~\x02\ - \x0b\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03~\x0c\x16\n\x0c\n\x05\x04\0\ - \x02\x04\x03\x12\x03~\x19\x1a\n\xca\x1e\n\x04\x04\0\x02\x05\x12\x04\xe6\ - \x01\x02\x12\x1a\xbb\x1e\x20The\x20units\x20in\x20which\x20the\x20metric\ - \x20value\x20is\x20reported.\x20It\x20is\x20only\x20applicable\n\x20if\ - \x20the\x20`value_type`\x20is\x20`INT64`,\x20`DOUBLE`,\x20or\x20`DISTRIB\ - UTION`.\x20The\x20`unit`\n\x20defines\x20the\x20representation\x20of\x20\ - the\x20stored\x20metric\x20values.\n\n\x20Different\x20systems\x20might\ - \x20scale\x20the\x20values\x20to\x20be\x20more\x20easily\x20displayed\ - \x20(so\x20a\n\x20value\x20of\x20`0.02kBy`\x20_might_\x20be\x20displayed\ - \x20as\x20`20By`,\x20and\x20a\x20value\x20of\n\x20`3523kBy`\x20_might_\ - \x20be\x20displayed\x20as\x20`3.5MBy`).\x20However,\x20if\x20the\x20`uni\ - t`\x20is\n\x20`kBy`,\x20then\x20the\x20value\x20of\x20the\x20metric\x20i\ - s\x20always\x20in\x20thousands\x20of\x20bytes,\x20no\n\x20matter\x20how\ - \x20it\x20might\x20be\x20displayed.\n\n\x20If\x20you\x20want\x20a\x20cus\ - tom\x20metric\x20to\x20record\x20the\x20exact\x20number\x20of\x20CPU-sec\ - onds\x20used\n\x20by\x20a\x20job,\x20you\x20can\x20create\x20an\x20`INT6\ - 4\x20CUMULATIVE`\x20metric\x20whose\x20`unit`\x20is\n\x20`s{CPU}`\x20(or\ + \x02\x06\x12\x03o\x04\x1c\n\x0e\n\x07\x04\0\x03\0\x02\x02\x01\x12\x03o\ + \x1d)\n\x0e\n\x07\x04\0\x03\0\x02\x02\x03\x12\x03o,-\nA\n\x06\x04\0\x03\ + \0\x02\x03\x12\x04r\x04s1\x1a1\x20The\x20scope\x20of\x20the\x20timeserie\ + s\x20data\x20of\x20the\x20metric.\n\n\x0e\n\x07\x04\0\x03\0\x02\x03\x04\ + \x12\x03r\x04\x0c\n\x0e\n\x07\x04\0\x03\0\x02\x03\x06\x12\x03r\r-\n\x0e\ + \n\x07\x04\0\x03\0\x02\x03\x01\x12\x03s\x08,\n\x0e\n\x07\x04\0\x03\0\x02\ + \x03\x03\x12\x03s/0\n:\n\x04\x04\0\x02\0\x12\x03w\x02\x12\x1a-\x20The\ + \x20resource\x20name\x20of\x20the\x20metric\x20descriptor.\n\n\x0c\n\x05\ + \x04\0\x02\0\x05\x12\x03w\x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03w\t\ + \r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03w\x10\x11\n\xaa\x03\n\x04\x04\0\ + \x02\x01\x12\x04\x81\x01\x02\x12\x1a\x9b\x03\x20The\x20metric\x20type,\ + \x20including\x20its\x20DNS\x20name\x20prefix.\x20The\x20type\x20is\x20n\ + ot\n\x20URL-encoded.\x20All\x20user-defined\x20metric\x20types\x20have\ + \x20the\x20DNS\x20name\n\x20`custom.googleapis.com`\x20or\x20`external.g\ + oogleapis.com`.\x20Metric\x20types\x20should\n\x20use\x20a\x20natural\ + \x20hierarchical\x20grouping.\x20For\x20example:\n\n\x20\x20\x20\x20\x20\ + \"custom.googleapis.com/invoice/paid/amount\"\n\x20\x20\x20\x20\x20\"ext\ + ernal.googleapis.com/prometheus/up\"\n\x20\x20\x20\x20\x20\"appengine.go\ + ogleapis.com/http/server/response_latencies\"\n\n\r\n\x05\x04\0\x02\x01\ + \x05\x12\x04\x81\x01\x02\x08\n\r\n\x05\x04\0\x02\x01\x01\x12\x04\x81\x01\ + \t\r\n\r\n\x05\x04\0\x02\x01\x03\x12\x04\x81\x01\x10\x11\n\xd6\x02\n\x04\ + \x04\0\x02\x02\x12\x04\x89\x01\x02&\x1a\xc7\x02\x20The\x20set\x20of\x20l\ + abels\x20that\x20can\x20be\x20used\x20to\x20describe\x20a\x20specific\n\ + \x20instance\x20of\x20this\x20metric\x20type.\x20For\x20example,\x20the\ + \n\x20`appengine.googleapis.com/http/server/response_latencies`\x20metri\ + c\n\x20type\x20has\x20a\x20label\x20for\x20the\x20HTTP\x20response\x20co\ + de,\x20`response_code`,\x20so\n\x20you\x20can\x20look\x20at\x20latencies\ + \x20for\x20successful\x20responses\x20or\x20just\n\x20for\x20responses\ + \x20that\x20failed.\n\n\r\n\x05\x04\0\x02\x02\x04\x12\x04\x89\x01\x02\n\ + \n\r\n\x05\x04\0\x02\x02\x06\x12\x04\x89\x01\x0b\x1a\n\r\n\x05\x04\0\x02\ + \x02\x01\x12\x04\x89\x01\x1b!\n\r\n\x05\x04\0\x02\x02\x03\x12\x04\x89\ + \x01$%\n\xa7\x01\n\x04\x04\0\x02\x03\x12\x04\x8d\x01\x02\x1d\x1a\x98\x01\ + \x20Whether\x20the\x20metric\x20records\x20instantaneous\x20values,\x20c\ + hanges\x20to\x20a\x20value,\x20etc.\n\x20Some\x20combinations\x20of\x20`\ + metric_kind`\x20and\x20`value_type`\x20might\x20not\x20be\x20supported.\ + \n\n\r\n\x05\x04\0\x02\x03\x06\x12\x04\x8d\x01\x02\x0c\n\r\n\x05\x04\0\ + \x02\x03\x01\x12\x04\x8d\x01\r\x18\n\r\n\x05\x04\0\x02\x03\x03\x12\x04\ + \x8d\x01\x1b\x1c\n\xa2\x01\n\x04\x04\0\x02\x04\x12\x04\x91\x01\x02\x1b\ + \x1a\x93\x01\x20Whether\x20the\x20measurement\x20is\x20an\x20integer,\ + \x20a\x20floating-point\x20number,\x20etc.\n\x20Some\x20combinations\x20\ + of\x20`metric_kind`\x20and\x20`value_type`\x20might\x20not\x20be\x20supp\ + orted.\n\n\r\n\x05\x04\0\x02\x04\x06\x12\x04\x91\x01\x02\x0b\n\r\n\x05\ + \x04\0\x02\x04\x01\x12\x04\x91\x01\x0c\x16\n\r\n\x05\x04\0\x02\x04\x03\ + \x12\x04\x91\x01\x19\x1a\n\xca\x1e\n\x04\x04\0\x02\x05\x12\x04\xf9\x01\ + \x02\x12\x1a\xbb\x1e\x20The\x20units\x20in\x20which\x20the\x20metric\x20\ + value\x20is\x20reported.\x20It\x20is\x20only\x20applicable\n\x20if\x20th\ + e\x20`value_type`\x20is\x20`INT64`,\x20`DOUBLE`,\x20or\x20`DISTRIBUTION`\ + .\x20The\x20`unit`\n\x20defines\x20the\x20representation\x20of\x20the\ + \x20stored\x20metric\x20values.\n\n\x20Different\x20systems\x20might\x20\ + scale\x20the\x20values\x20to\x20be\x20more\x20easily\x20displayed\x20(so\ + \x20a\n\x20value\x20of\x20`0.02kBy`\x20_might_\x20be\x20displayed\x20as\ + \x20`20By`,\x20and\x20a\x20value\x20of\n\x20`3523kBy`\x20_might_\x20be\ + \x20displayed\x20as\x20`3.5MBy`).\x20However,\x20if\x20the\x20`unit`\x20\ + is\n\x20`kBy`,\x20then\x20the\x20value\x20of\x20the\x20metric\x20is\x20a\ + lways\x20in\x20thousands\x20of\x20bytes,\x20no\n\x20matter\x20how\x20it\ + \x20might\x20be\x20displayed.\n\n\x20If\x20you\x20want\x20a\x20custom\ + \x20metric\x20to\x20record\x20the\x20exact\x20number\x20of\x20CPU-second\ + s\x20used\n\x20by\x20a\x20job,\x20you\x20can\x20create\x20an\x20`INT64\ + \x20CUMULATIVE`\x20metric\x20whose\x20`unit`\x20is\n\x20`s{CPU}`\x20(or\ \x20equivalently\x20`1s{CPU}`\x20or\x20just\x20`s`).\x20If\x20the\x20job\ \x20uses\x2012,005\n\x20CPU-seconds,\x20then\x20the\x20value\x20is\x20wr\ itten\x20as\x20`12005`.\n\n\x20Alternatively,\x20if\x20you\x20want\x20a\ @@ -1427,65 +1241,90 @@ static file_descriptor_proto_data: &'static [u8] = b"\ that\x20will\x20be\x20multiplied\x20by\x20100\x20and\x20displayed\x20as\ \x20a\x20percentage\n\x20\x20\x20\x20(so\x20a\x20metric\x20value\x20`0.0\ 3`\x20means\x20\"3\x20percent\").\n\n\r\n\x05\x04\0\x02\x05\x05\x12\x04\ - \xe6\x01\x02\x08\n\r\n\x05\x04\0\x02\x05\x01\x12\x04\xe6\x01\t\r\n\r\n\ - \x05\x04\0\x02\x05\x03\x12\x04\xe6\x01\x10\x11\nY\n\x04\x04\0\x02\x06\ - \x12\x04\xe9\x01\x02\x19\x1aK\x20A\x20detailed\x20description\x20of\x20t\ + \xf9\x01\x02\x08\n\r\n\x05\x04\0\x02\x05\x01\x12\x04\xf9\x01\t\r\n\r\n\ + \x05\x04\0\x02\x05\x03\x12\x04\xf9\x01\x10\x11\nY\n\x04\x04\0\x02\x06\ + \x12\x04\xfc\x01\x02\x19\x1aK\x20A\x20detailed\x20description\x20of\x20t\ he\x20metric,\x20which\x20can\x20be\x20used\x20in\x20documentation.\n\n\ - \r\n\x05\x04\0\x02\x06\x05\x12\x04\xe9\x01\x02\x08\n\r\n\x05\x04\0\x02\ - \x06\x01\x12\x04\xe9\x01\t\x14\n\r\n\x05\x04\0\x02\x06\x03\x12\x04\xe9\ - \x01\x17\x18\n\xa3\x02\n\x04\x04\0\x02\x07\x12\x04\xef\x01\x02\x1a\x1a\ + \r\n\x05\x04\0\x02\x06\x05\x12\x04\xfc\x01\x02\x08\n\r\n\x05\x04\0\x02\ + \x06\x01\x12\x04\xfc\x01\t\x14\n\r\n\x05\x04\0\x02\x06\x03\x12\x04\xfc\ + \x01\x17\x18\n\xa3\x02\n\x04\x04\0\x02\x07\x12\x04\x82\x02\x02\x1a\x1a\ \x94\x02\x20A\x20concise\x20name\x20for\x20the\x20metric,\x20which\x20ca\ n\x20be\x20displayed\x20in\x20user\x20interfaces.\n\x20Use\x20sentence\ \x20case\x20without\x20an\x20ending\x20period,\x20for\x20example\x20\"Re\ quest\x20count\".\n\x20This\x20field\x20is\x20optional\x20but\x20it\x20i\ s\x20recommended\x20to\x20be\x20set\x20for\x20any\x20metrics\n\x20associ\ ated\x20with\x20user-visible\x20concepts,\x20such\x20as\x20Quota.\n\n\r\ - \n\x05\x04\0\x02\x07\x05\x12\x04\xef\x01\x02\x08\n\r\n\x05\x04\0\x02\x07\ - \x01\x12\x04\xef\x01\t\x15\n\r\n\x05\x04\0\x02\x07\x03\x12\x04\xef\x01\ - \x18\x19\nR\n\x04\x04\0\x02\x08\x12\x04\xf2\x01\x02)\x1aD\x20Optional.\ + \n\x05\x04\0\x02\x07\x05\x12\x04\x82\x02\x02\x08\n\r\n\x05\x04\0\x02\x07\ + \x01\x12\x04\x82\x02\t\x15\n\r\n\x05\x04\0\x02\x07\x03\x12\x04\x82\x02\ + \x18\x19\nR\n\x04\x04\0\x02\x08\x12\x04\x85\x02\x02)\x1aD\x20Optional.\ \x20Metadata\x20which\x20can\x20be\x20used\x20to\x20guide\x20usage\x20of\ - \x20the\x20metric.\n\n\r\n\x05\x04\0\x02\x08\x06\x12\x04\xf2\x01\x02\x1a\ - \n\r\n\x05\x04\0\x02\x08\x01\x12\x04\xf2\x01\x1b#\n\r\n\x05\x04\0\x02\ - \x08\x03\x12\x04\xf2\x01&(\nD\n\x04\x04\0\x02\t\x12\x04\xf5\x01\x02\x20\ + \x20the\x20metric.\n\n\r\n\x05\x04\0\x02\x08\x06\x12\x04\x85\x02\x02\x1a\ + \n\r\n\x05\x04\0\x02\x08\x01\x12\x04\x85\x02\x1b#\n\r\n\x05\x04\0\x02\ + \x08\x03\x12\x04\x85\x02&(\nD\n\x04\x04\0\x02\t\x12\x04\x88\x02\x02\x20\ \x1a6\x20Optional.\x20The\x20launch\x20stage\x20of\x20the\x20metric\x20d\ - efinition.\n\n\r\n\x05\x04\0\x02\t\x06\x12\x04\xf5\x01\x02\r\n\r\n\x05\ - \x04\0\x02\t\x01\x12\x04\xf5\x01\x0e\x1a\n\r\n\x05\x04\0\x02\t\x03\x12\ - \x04\xf5\x01\x1d\x1f\n\xd5\x02\n\x04\x04\0\x02\n\x12\x04\xfd\x01\x020\ + efinition.\n\n\r\n\x05\x04\0\x02\t\x06\x12\x04\x88\x02\x02\r\n\r\n\x05\ + \x04\0\x02\t\x01\x12\x04\x88\x02\x0e\x1a\n\r\n\x05\x04\0\x02\t\x03\x12\ + \x04\x88\x02\x1d\x1f\n\xd5\x02\n\x04\x04\0\x02\n\x12\x04\x90\x02\x020\ \x1a\xc6\x02\x20Read-only.\x20If\x20present,\x20then\x20a\x20[time\n\x20\ series][google.monitoring.v3.TimeSeries],\x20which\x20is\x20identified\ \x20partially\x20by\n\x20a\x20metric\x20type\x20and\x20a\n\x20[Monitored\ ResourceDescriptor][google.api.MonitoredResourceDescriptor],\x20that\n\ \x20is\x20associated\x20with\x20this\x20metric\x20type\x20can\x20only\ \x20be\x20associated\x20with\x20one\x20of\x20the\n\x20monitored\x20resou\ - rce\x20types\x20listed\x20here.\n\n\r\n\x05\x04\0\x02\n\x04\x12\x04\xfd\ - \x01\x02\n\n\r\n\x05\x04\0\x02\n\x05\x12\x04\xfd\x01\x0b\x11\n\r\n\x05\ - \x04\0\x02\n\x01\x12\x04\xfd\x01\x12*\n\r\n\x05\x04\0\x02\n\x03\x12\x04\ - \xfd\x01-/\n\x92\x01\n\x02\x04\x01\x12\x06\x82\x02\0\x8b\x02\x01\x1a\x83\ + rce\x20types\x20listed\x20here.\n\n\r\n\x05\x04\0\x02\n\x04\x12\x04\x90\ + \x02\x02\n\n\r\n\x05\x04\0\x02\n\x05\x12\x04\x90\x02\x0b\x11\n\r\n\x05\ + \x04\0\x02\n\x01\x12\x04\x90\x02\x12*\n\r\n\x05\x04\0\x02\n\x03\x12\x04\ + \x90\x02-/\n\x92\x01\n\x02\x04\x01\x12\x06\x95\x02\0\x9e\x02\x01\x1a\x83\ \x01\x20A\x20specific\x20metric,\x20identified\x20by\x20specifying\x20va\ lues\x20for\x20all\x20of\x20the\n\x20labels\x20of\x20a\x20[`MetricDescri\ ptor`][google.api.MetricDescriptor].\n\n\x0b\n\x03\x04\x01\x01\x12\x04\ - \x82\x02\x08\x0e\n\xa5\x01\n\x04\x04\x01\x02\0\x12\x04\x86\x02\x02\x12\ + \x95\x02\x08\x0e\n\xa5\x01\n\x04\x04\x01\x02\0\x12\x04\x99\x02\x02\x12\ \x1a\x96\x01\x20An\x20existing\x20metric\x20type,\x20see\n\x20[google.ap\ i.MetricDescriptor][google.api.MetricDescriptor].\x20For\x20example,\n\ \x20`custom.googleapis.com/invoice/paid/amount`.\n\n\r\n\x05\x04\x01\x02\ - \0\x05\x12\x04\x86\x02\x02\x08\n\r\n\x05\x04\x01\x02\0\x01\x12\x04\x86\ - \x02\t\r\n\r\n\x05\x04\x01\x02\0\x03\x12\x04\x86\x02\x10\x11\n\x92\x01\n\ - \x04\x04\x01\x02\x01\x12\x04\x8a\x02\x02!\x1a\x83\x01\x20The\x20set\x20o\ + \0\x05\x12\x04\x99\x02\x02\x08\n\r\n\x05\x04\x01\x02\0\x01\x12\x04\x99\ + \x02\t\r\n\r\n\x05\x04\x01\x02\0\x03\x12\x04\x99\x02\x10\x11\n\x92\x01\n\ + \x04\x04\x01\x02\x01\x12\x04\x9d\x02\x02!\x1a\x83\x01\x20The\x20set\x20o\ f\x20label\x20values\x20that\x20uniquely\x20identify\x20this\x20metric.\ \x20All\n\x20labels\x20listed\x20in\x20the\x20`MetricDescriptor`\x20must\ \x20be\x20assigned\x20values.\n\n\r\n\x05\x04\x01\x02\x01\x06\x12\x04\ - \x8a\x02\x02\x15\n\r\n\x05\x04\x01\x02\x01\x01\x12\x04\x8a\x02\x16\x1c\n\ - \r\n\x05\x04\x01\x02\x01\x03\x12\x04\x8a\x02\x1f\x20b\x06proto3\ + \x9d\x02\x02\x15\n\r\n\x05\x04\x01\x02\x01\x01\x12\x04\x9d\x02\x16\x1c\n\ + \r\n\x05\x04\x01\x02\x01\x03\x12\x04\x9d\x02\x1f\x20b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(3); + deps.push(super::label::file_descriptor().clone()); + deps.push(super::launch_stage::file_descriptor().clone()); + deps.push(::protobuf::well_known_types::duration::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(3); + messages.push(MetricDescriptor::generated_message_descriptor_data()); + messages.push(Metric::generated_message_descriptor_data()); + messages.push(metric_descriptor::MetricDescriptorMetadata::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(3); + enums.push(metric_descriptor::MetricKind::generated_enum_descriptor_data()); + enums.push(metric_descriptor::ValueType::generated_enum_descriptor_data()); + enums.push(metric_descriptor::metric_descriptor_metadata::TimeSeriesResourceHierarchyLevel::generated_enum_descriptor_data()); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/mod.rs b/googleapis-raw/src/api/mod.rs index ca6bc43..9642504 100644 --- a/googleapis-raw/src/api/mod.rs +++ b/googleapis-raw/src/api/mod.rs @@ -14,6 +14,7 @@ pub mod documentation; pub mod endpoint; pub mod error_reason; pub mod field_behavior; +pub mod field_info; pub mod http; pub mod httpbody; pub mod label; @@ -28,9 +29,9 @@ pub mod quota; pub mod resource; pub mod routing; pub mod service; -pub mod servicecontrol; -pub mod servicemanagement; pub mod source_info; pub mod system_parameter; pub mod usage; pub mod visibility; +pub mod servicecontrol; +pub mod servicemanagement; diff --git a/googleapis-raw/src/api/monitored_resource.rs b/googleapis-raw/src/api/monitored_resource.rs index e240c91..ba244c5 100644 --- a/googleapis-raw/src/api/monitored_resource.rs +++ b/googleapis-raw/src/api/monitored_resource.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,33 +9,74 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/monitored_resource.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default)] +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; + +/// An object that describes the schema of a +/// [MonitoredResource][google.api.MonitoredResource] object using a type name +/// and a set of labels. For example, the monitored resource descriptor for +/// Google Compute Engine VM instances has a type of +/// `"gce_instance"` and specifies the use of the labels `"instance_id"` and +/// `"zone"` to identify particular VM instances. +/// +/// Different APIs can support different monitored resource types. APIs generally +/// provide a `list` method that returns the monitored resource descriptors used +/// by the API. +/// +// @@protoc_insertion_point(message:google.api.MonitoredResourceDescriptor) +#[derive(PartialEq,Clone,Default,Debug)] pub struct MonitoredResourceDescriptor { // message fields + /// Optional. The resource name of the monitored resource descriptor: + /// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where + /// {type} is the value of the `type` field in this object and + /// {project_id} is a project ID that provides API-specific context for + /// accessing the type. APIs that do not use project information can use the + /// resource name format `"monitoredResourceDescriptors/{type}"`. + // @@protoc_insertion_point(field:google.api.MonitoredResourceDescriptor.name) pub name: ::std::string::String, - pub field_type: ::std::string::String, + /// Required. The monitored resource type. For example, the type + /// `"cloudsql_database"` represents databases in Google Cloud SQL. + /// For a list of types, see [Monitored resource + /// types](https://cloud.google.com/monitoring/api/resources) + /// and [Logging resource + /// types](https://cloud.google.com/logging/docs/api/v2/resource-list). + // @@protoc_insertion_point(field:google.api.MonitoredResourceDescriptor.type) + pub type_: ::std::string::String, + /// Optional. A concise name for the monitored resource type that might be + /// displayed in user interfaces. It should be a Title Cased Noun Phrase, + /// without any article or other determiners. For example, + /// `"Google Cloud SQL Database"`. + // @@protoc_insertion_point(field:google.api.MonitoredResourceDescriptor.display_name) pub display_name: ::std::string::String, + /// Optional. A detailed description of the monitored resource type that might + /// be used in documentation. + // @@protoc_insertion_point(field:google.api.MonitoredResourceDescriptor.description) pub description: ::std::string::String, - pub labels: ::protobuf::RepeatedField, - pub launch_stage: super::launch_stage::LaunchStage, + /// Required. A set of labels used to describe instances of this monitored + /// resource type. For example, an individual Google Cloud SQL database is + /// identified by values for the labels `"database_id"` and `"zone"`. + // @@protoc_insertion_point(field:google.api.MonitoredResourceDescriptor.labels) + pub labels: ::std::vec::Vec, + /// Optional. The launch stage of the monitored resource definition. + // @@protoc_insertion_point(field:google.api.MonitoredResourceDescriptor.launch_stage) + pub launch_stage: ::protobuf::EnumOrUnknown, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.MonitoredResourceDescriptor.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a MonitoredResourceDescriptor { @@ -48,185 +90,77 @@ impl MonitoredResourceDescriptor { ::std::default::Default::default() } - // string name = 5; - - - 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 type = 1; - - - pub fn get_field_type(&self) -> &str { - &self.field_type - } - pub fn clear_field_type(&mut self) { - self.field_type.clear(); - } - - // Param is passed by value, moved - pub fn set_field_type(&mut self, v: ::std::string::String) { - self.field_type = 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 ::std::string::String { - &mut self.field_type - } - - // Take field - pub fn take_field_type(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.field_type, ::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()) - } - - // string description = 3; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // repeated .google.api.LabelDescriptor labels = 4; - - - pub fn get_labels(&self) -> &[super::label::LabelDescriptor] { - &self.labels - } - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::protobuf::RepeatedField) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.labels, ::protobuf::RepeatedField::new()) - } - - // .google.api.LaunchStage launch_stage = 7; - - - pub fn get_launch_stage(&self) -> super::launch_stage::LaunchStage { - self.launch_stage - } - pub fn clear_launch_stage(&mut self) { - self.launch_stage = super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_launch_stage(&mut self, v: super::launch_stage::LaunchStage) { - self.launch_stage = v; + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(6); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &MonitoredResourceDescriptor| { &m.name }, + |m: &mut MonitoredResourceDescriptor| { &mut m.name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "type", + |m: &MonitoredResourceDescriptor| { &m.type_ }, + |m: &mut MonitoredResourceDescriptor| { &mut m.type_ }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "display_name", + |m: &MonitoredResourceDescriptor| { &m.display_name }, + |m: &mut MonitoredResourceDescriptor| { &mut m.display_name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "description", + |m: &MonitoredResourceDescriptor| { &m.description }, + |m: &mut MonitoredResourceDescriptor| { &mut m.description }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "labels", + |m: &MonitoredResourceDescriptor| { &m.labels }, + |m: &mut MonitoredResourceDescriptor| { &mut m.labels }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "launch_stage", + |m: &MonitoredResourceDescriptor| { &m.launch_stage }, + |m: &mut MonitoredResourceDescriptor| { &mut m.launch_stage }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MonitoredResourceDescriptor", + fields, + oneofs, + ) } } impl ::protobuf::Message for MonitoredResourceDescriptor { + const NAME: &'static str = "MonitoredResourceDescriptor"; + fn is_initialized(&self) -> bool { - for v in &self.labels { - 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 { - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 42 => { + self.name = is.read_string()?; }, - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?; + 10 => { + self.type_ = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.display_name)?; + 18 => { + self.display_name = is.read_string()?; }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; + 26 => { + self.description = is.read_string()?; }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.labels)?; + 34 => { + self.labels.push(is.read_message()?); }, - 7 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.launch_stage, 7, &mut self.unknown_fields)? + 56 => { + self.launch_stage = is.read_enum_or_unknown()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -235,13 +169,13 @@ impl ::protobuf::Message for MonitoredResourceDescriptor { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(5, &self.name); } - if !self.field_type.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.field_type); + if !self.type_.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.type_); } if !self.display_name.is_empty() { my_size += ::protobuf::rt::string_size(2, &self.display_name); @@ -251,22 +185,22 @@ impl ::protobuf::Message for MonitoredResourceDescriptor { } for value in &self.labels { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - if self.launch_stage != super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(7, self.launch_stage); + if self.launch_stage != ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(7, self.launch_stage.value()); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.name.is_empty() { os.write_string(5, &self.name)?; } - if !self.field_type.is_empty() { - os.write_string(1, &self.field_type)?; + if !self.type_.is_empty() { + os.write_string(1, &self.type_)?; } if !self.display_name.is_empty() { os.write_string(2, &self.display_name)?; @@ -275,127 +209,89 @@ impl ::protobuf::Message for MonitoredResourceDescriptor { os.write_string(3, &self.description)?; } for v in &self.labels { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }; - if self.launch_stage != super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED { - os.write_enum(7, ::protobuf::ProtobufEnum::value(&self.launch_stage))?; + if self.launch_stage != ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED) { + os.write_enum(7, ::protobuf::EnumOrUnknown::value(&self.launch_stage))?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> MonitoredResourceDescriptor { MonitoredResourceDescriptor::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &MonitoredResourceDescriptor| { &m.name }, - |m: &mut MonitoredResourceDescriptor| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &MonitoredResourceDescriptor| { &m.field_type }, - |m: &mut MonitoredResourceDescriptor| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "display_name", - |m: &MonitoredResourceDescriptor| { &m.display_name }, - |m: &mut MonitoredResourceDescriptor| { &mut m.display_name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &MonitoredResourceDescriptor| { &m.description }, - |m: &mut MonitoredResourceDescriptor| { &mut m.description }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "labels", - |m: &MonitoredResourceDescriptor| { &m.labels }, - |m: &mut MonitoredResourceDescriptor| { &mut m.labels }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "launch_stage", - |m: &MonitoredResourceDescriptor| { &m.launch_stage }, - |m: &mut MonitoredResourceDescriptor| { &mut m.launch_stage }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MonitoredResourceDescriptor", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.name.clear(); + self.type_.clear(); + self.display_name.clear(); + self.description.clear(); + self.labels.clear(); + self.launch_stage = ::protobuf::EnumOrUnknown::new(super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED); + self.special_fields.clear(); } fn default_instance() -> &'static MonitoredResourceDescriptor { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MonitoredResourceDescriptor::new) + static instance: MonitoredResourceDescriptor = MonitoredResourceDescriptor { + name: ::std::string::String::new(), + type_: ::std::string::String::new(), + display_name: ::std::string::String::new(), + description: ::std::string::String::new(), + labels: ::std::vec::Vec::new(), + launch_stage: ::protobuf::EnumOrUnknown::from_i32(0), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for MonitoredResourceDescriptor { - fn clear(&mut self) { - self.name.clear(); - self.field_type.clear(); - self.display_name.clear(); - self.description.clear(); - self.labels.clear(); - self.launch_stage = super::launch_stage::LaunchStage::LAUNCH_STAGE_UNSPECIFIED; - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for MonitoredResourceDescriptor { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MonitoredResourceDescriptor").unwrap()).clone() } } -impl ::std::fmt::Debug for MonitoredResourceDescriptor { +impl ::std::fmt::Display for MonitoredResourceDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for MonitoredResourceDescriptor { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.MonitoredResource) +#[derive(PartialEq,Clone,Default,Debug)] pub struct MonitoredResource { // message fields - pub field_type: ::std::string::String, + /// Required. The monitored resource type. This field must match + /// the `type` field of a + /// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] + /// object. For example, the type of a Compute Engine VM instance is + /// `gce_instance`. Some descriptors include the service name in the type; for + /// example, the type of a Datastream stream is + /// `datastream.googleapis.com/Stream`. + // @@protoc_insertion_point(field:google.api.MonitoredResource.type) + pub type_: ::std::string::String, + /// Required. Values for all of the labels listed in the associated monitored + /// resource descriptor. For example, Compute Engine VM instances use the + /// labels `"project_id"`, `"instance_id"`, and `"zone"`. + // @@protoc_insertion_point(field:google.api.MonitoredResource.labels) pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.MonitoredResource.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a MonitoredResource { @@ -409,75 +305,57 @@ impl MonitoredResource { ::std::default::Default::default() } - // string type = 1; - - - pub fn get_field_type(&self) -> &str { - &self.field_type - } - pub fn clear_field_type(&mut self) { - self.field_type.clear(); - } - - // Param is passed by value, moved - pub fn set_field_type(&mut self, v: ::std::string::String) { - self.field_type = 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 ::std::string::String { - &mut self.field_type - } - - // Take field - pub fn take_field_type(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.field_type, ::std::string::String::new()) - } - - // repeated .google.api.MonitoredResource.LabelsEntry labels = 2; - - - pub fn get_labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.labels - } - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "type", + |m: &MonitoredResource| { &m.type_ }, + |m: &mut MonitoredResource| { &mut m.type_ }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "labels", + |m: &MonitoredResource| { &m.labels }, + |m: &mut MonitoredResource| { &mut m.labels }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MonitoredResource", + fields, + oneofs, + ) } } impl ::protobuf::Message for MonitoredResource { + const NAME: &'static str = "MonitoredResource"; + 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.field_type)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.type_ = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?; + 18 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 18 => value = is.read_string()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.labels.insert(key, value); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -486,112 +364,98 @@ impl ::protobuf::Message for MonitoredResource { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if !self.field_type.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.field_type); + if !self.type_.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.type_); } - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels); - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + for (k, v) in &self.labels { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.field_type.is_empty() { - os.write_string(1, &self.field_type)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.type_.is_empty() { + os.write_string(1, &self.type_)?; } - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels, os)?; - os.write_unknown_fields(self.get_unknown_fields())?; + for (k, v) in &self.labels { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + os.write_raw_varint32(18)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + os.write_string(2, &v)?; + }; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> MonitoredResource { MonitoredResource::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &MonitoredResource| { &m.field_type }, - |m: &mut MonitoredResource| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>( - "labels", - |m: &MonitoredResource| { &m.labels }, - |m: &mut MonitoredResource| { &mut m.labels }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MonitoredResource", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.type_.clear(); + self.labels.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static MonitoredResource { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); instance.get(MonitoredResource::new) } } -impl ::protobuf::Clear for MonitoredResource { - fn clear(&mut self) { - self.field_type.clear(); - self.labels.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for MonitoredResource { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MonitoredResource").unwrap()).clone() } } -impl ::std::fmt::Debug for MonitoredResource { +impl ::std::fmt::Display for MonitoredResource { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for MonitoredResource { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] +/// object. [MonitoredResource][google.api.MonitoredResource] objects contain the +/// minimum set of information to uniquely identify a monitored resource +/// instance. There is some other useful auxiliary metadata. Monitoring and +/// Logging use an ingestion pipeline to extract metadata for cloud resources of +/// all types, and store the metadata in this message. +// @@protoc_insertion_point(message:google.api.MonitoredResourceMetadata) +#[derive(PartialEq,Clone,Default,Debug)] pub struct MonitoredResourceMetadata { // message fields - pub system_labels: ::protobuf::SingularPtrField<::protobuf::well_known_types::Struct>, + // @@protoc_insertion_point(field:google.api.MonitoredResourceMetadata.system_labels) + pub system_labels: ::protobuf::MessageField<::protobuf::well_known_types::struct_::Struct>, + /// Output only. A map of user-defined metadata labels. + // @@protoc_insertion_point(field:google.api.MonitoredResourceMetadata.user_labels) pub user_labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.MonitoredResourceMetadata.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a MonitoredResourceMetadata { @@ -605,87 +469,57 @@ impl MonitoredResourceMetadata { ::std::default::Default::default() } - // .google.protobuf.Struct system_labels = 1; - - - pub fn get_system_labels(&self) -> &::protobuf::well_known_types::Struct { - self.system_labels.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Struct as ::protobuf::Message>::default_instance()) - } - pub fn clear_system_labels(&mut self) { - self.system_labels.clear(); - } - - pub fn has_system_labels(&self) -> bool { - self.system_labels.is_some() - } - - // Param is passed by value, moved - pub fn set_system_labels(&mut self, v: ::protobuf::well_known_types::Struct) { - self.system_labels = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_system_labels(&mut self) -> &mut ::protobuf::well_known_types::Struct { - if self.system_labels.is_none() { - self.system_labels.set_default(); - } - self.system_labels.as_mut().unwrap() - } - - // Take field - pub fn take_system_labels(&mut self) -> ::protobuf::well_known_types::Struct { - self.system_labels.take().unwrap_or_else(|| ::protobuf::well_known_types::Struct::new()) - } - - // repeated .google.api.MonitoredResourceMetadata.UserLabelsEntry user_labels = 2; - - - pub fn get_user_labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.user_labels - } - pub fn clear_user_labels(&mut self) { - self.user_labels.clear(); - } - - // Param is passed by value, moved - pub fn set_user_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.user_labels = v; - } - - // Mutable pointer to the field. - pub fn mut_user_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.user_labels - } - - // Take field - pub fn take_user_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.user_labels, ::std::collections::HashMap::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::struct_::Struct>( + "system_labels", + |m: &MonitoredResourceMetadata| { &m.system_labels }, + |m: &mut MonitoredResourceMetadata| { &mut m.system_labels }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "user_labels", + |m: &MonitoredResourceMetadata| { &m.user_labels }, + |m: &mut MonitoredResourceMetadata| { &mut m.user_labels }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MonitoredResourceMetadata", + fields, + oneofs, + ) } } impl ::protobuf::Message for MonitoredResourceMetadata { + const NAME: &'static str = "MonitoredResourceMetadata"; + fn is_initialized(&self) -> bool { - for v in &self.system_labels { - 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_message_into(wire_type, is, &mut self.system_labels)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.system_labels)?; }, - 2 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.user_labels)?; + 18 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 18 => value = is.read_string()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.user_labels.insert(key, value); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -694,105 +528,79 @@ impl ::protobuf::Message for MonitoredResourceMetadata { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if let Some(ref v) = self.system_labels.as_ref() { + if let Some(v) = self.system_labels.as_ref() { let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.user_labels); - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + for (k, v) in &self.user_labels { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.system_labels.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.system_labels.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.user_labels, os)?; - os.write_unknown_fields(self.get_unknown_fields())?; + for (k, v) in &self.user_labels { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::string_size(2, &v); + os.write_raw_varint32(18)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + os.write_string(2, &v)?; + }; + os.write_unknown_fields(self.special_fields.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 special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> MonitoredResourceMetadata { MonitoredResourceMetadata::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Struct>>( - "system_labels", - |m: &MonitoredResourceMetadata| { &m.system_labels }, - |m: &mut MonitoredResourceMetadata| { &mut m.system_labels }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>( - "user_labels", - |m: &MonitoredResourceMetadata| { &m.user_labels }, - |m: &mut MonitoredResourceMetadata| { &mut m.user_labels }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MonitoredResourceMetadata", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.system_labels.clear(); + self.user_labels.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static MonitoredResourceMetadata { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); instance.get(MonitoredResourceMetadata::new) } } -impl ::protobuf::Clear for MonitoredResourceMetadata { - fn clear(&mut self) { - self.system_labels.clear(); - self.user_labels.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for MonitoredResourceMetadata { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MonitoredResourceMetadata").unwrap()).clone() } } -impl ::std::fmt::Debug for MonitoredResourceMetadata { +impl ::std::fmt::Display for MonitoredResourceMetadata { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for MonitoredResourceMetadata { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -815,8 +623,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\ \x01(\tR\x05value:\x028\x01By\n\x0ecom.google.apiB\x16MonitoredResourceP\ rotoP\x01ZCgoogle.golang.org/genproto/googleapis/api/monitoredres;monito\ - redres\xf8\x01\x01\xa2\x02\x04GAPIJ\xac,\n\x07\x12\x05\x0e\0\x81\x01\x01\ - \n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20\ + redres\xf8\x01\x01\xa2\x02\x04GAPIJ\xab,\n\x07\x12\x05\x0e\0\x81\x01\x01\ + \n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20\ Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apache\x20License,\x20V\ ersion\x202.0\x20(the\x20\"License\");\n\x20you\x20may\x20not\x20use\x20\ this\x20file\x20except\x20in\x20compliance\x20with\x20the\x20License.\n\ @@ -858,14 +666,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ nformation\x20can\x20use\x20the\n\x20resource\x20name\x20format\x20`\"mo\ nitoredResourceDescriptors/{type}\"`.\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\ \x03/\x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03/\t\r\n\x0c\n\x05\x04\0\ - \x02\0\x03\x12\x03/\x10\x11\n\xd5\x02\n\x04\x04\0\x02\x01\x12\x037\x02\ - \x12\x1a\xc7\x02\x20Required.\x20The\x20monitored\x20resource\x20type.\ + \x02\0\x03\x12\x03/\x10\x11\n\xd4\x02\n\x04\x04\0\x02\x01\x12\x037\x02\ + \x12\x1a\xc6\x02\x20Required.\x20The\x20monitored\x20resource\x20type.\ \x20For\x20example,\x20the\x20type\n\x20`\"cloudsql_database\"`\x20repre\ sents\x20databases\x20in\x20Google\x20Cloud\x20SQL.\n\x20\x20For\x20a\ - \x20list\x20of\x20types,\x20see\x20[Monitoring\x20resource\n\x20\x20type\ - s](https://cloud.google.com/monitoring/api/resources)\n\x20and\x20[Loggi\ - ng\x20resource\n\x20types](https://cloud.google.com/logging/docs/api/v2/\ - resource-list).\n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x037\x02\x08\n\x0c\n\ + \x20list\x20of\x20types,\x20see\x20[Monitored\x20resource\n\x20\x20types\ + ](https://cloud.google.com/monitoring/api/resources)\n\x20and\x20[Loggin\ + g\x20resource\n\x20types](https://cloud.google.com/logging/docs/api/v2/r\ + esource-list).\n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x037\x02\x08\n\x0c\n\ \x05\x04\0\x02\x01\x01\x12\x037\t\r\n\x0c\n\x05\x04\0\x02\x01\x03\x12\ \x037\x10\x11\n\xf5\x01\n\x04\x04\0\x02\x02\x12\x03=\x02\x1a\x1a\xe7\x01\ \x20Optional.\x20A\x20concise\x20name\x20for\x20the\x20monitored\x20reso\ @@ -957,14 +765,36 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x01$%b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(3); + deps.push(super::label::file_descriptor().clone()); + deps.push(super::launch_stage::file_descriptor().clone()); + deps.push(::protobuf::well_known_types::struct_::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(3); + messages.push(MonitoredResourceDescriptor::generated_message_descriptor_data()); + messages.push(MonitoredResource::generated_message_descriptor_data()); + messages.push(MonitoredResourceMetadata::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/monitoring.rs b/googleapis-raw/src/api/monitoring.rs index 5065f13..63ee8b4 100644 --- a/googleapis-raw/src/api/monitoring.rs +++ b/googleapis-raw/src/api/monitoring.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,29 +9,45 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/monitoring.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Monitoring) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Monitoring { // message fields - pub producer_destinations: ::protobuf::RepeatedField, - pub consumer_destinations: ::protobuf::RepeatedField, + /// Monitoring configurations for sending metrics to the producer project. + /// There can be multiple producer destinations. A monitored resource type may + /// appear in multiple monitoring destinations if different aggregations are + /// needed for different sets of metrics associated with that monitored + /// resource type. A monitored resource and metric pair may only be used once + /// in the Monitoring configuration. + // @@protoc_insertion_point(field:google.api.Monitoring.producer_destinations) + pub producer_destinations: ::std::vec::Vec, + /// Monitoring configurations for sending metrics to the consumer project. + /// There can be multiple consumer destinations. A monitored resource type may + /// appear in multiple monitoring destinations if different aggregations are + /// needed for different sets of metrics associated with that monitored + /// resource type. A monitored resource and metric pair may only be used once + /// in the Monitoring configuration. + // @@protoc_insertion_point(field:google.api.Monitoring.consumer_destinations) + pub consumer_destinations: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Monitoring.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Monitoring { @@ -44,84 +61,45 @@ impl Monitoring { ::std::default::Default::default() } - // repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; - - - pub fn get_producer_destinations(&self) -> &[Monitoring_MonitoringDestination] { - &self.producer_destinations - } - pub fn clear_producer_destinations(&mut self) { - self.producer_destinations.clear(); - } - - // Param is passed by value, moved - pub fn set_producer_destinations(&mut self, v: ::protobuf::RepeatedField) { - self.producer_destinations = v; - } - - // Mutable pointer to the field. - pub fn mut_producer_destinations(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.producer_destinations - } - - // Take field - pub fn take_producer_destinations(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.producer_destinations, ::protobuf::RepeatedField::new()) - } - - // repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; - - - pub fn get_consumer_destinations(&self) -> &[Monitoring_MonitoringDestination] { - &self.consumer_destinations - } - pub fn clear_consumer_destinations(&mut self) { - self.consumer_destinations.clear(); - } - - // Param is passed by value, moved - pub fn set_consumer_destinations(&mut self, v: ::protobuf::RepeatedField) { - self.consumer_destinations = v; - } - - // Mutable pointer to the field. - pub fn mut_consumer_destinations(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.consumer_destinations - } - - // Take field - pub fn take_consumer_destinations(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.consumer_destinations, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "producer_destinations", + |m: &Monitoring| { &m.producer_destinations }, + |m: &mut Monitoring| { &mut m.producer_destinations }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "consumer_destinations", + |m: &Monitoring| { &m.consumer_destinations }, + |m: &mut Monitoring| { &mut m.consumer_destinations }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Monitoring", + fields, + oneofs, + ) } } impl ::protobuf::Message for Monitoring { + const NAME: &'static str = "Monitoring"; + fn is_initialized(&self) -> bool { - for v in &self.producer_destinations { - if !v.is_initialized() { - return false; - } - }; - for v in &self.consumer_destinations { - 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.producer_destinations)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.producer_destinations.push(is.read_message()?); }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.consumer_destinations)?; + 18 => { + self.consumer_destinations.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -130,311 +108,225 @@ impl ::protobuf::Message for Monitoring { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.producer_destinations { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for value in &self.consumer_destinations { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.producer_destinations { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; for v in &self.consumer_destinations { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Monitoring { Monitoring::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "producer_destinations", - |m: &Monitoring| { &m.producer_destinations }, - |m: &mut Monitoring| { &mut m.producer_destinations }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "consumer_destinations", - |m: &Monitoring| { &m.consumer_destinations }, - |m: &mut Monitoring| { &mut m.consumer_destinations }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Monitoring", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.producer_destinations.clear(); + self.consumer_destinations.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Monitoring { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Monitoring::new) + static instance: Monitoring = Monitoring { + producer_destinations: ::std::vec::Vec::new(), + consumer_destinations: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Monitoring { - fn clear(&mut self) { - self.producer_destinations.clear(); - self.consumer_destinations.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Monitoring { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Monitoring").unwrap()).clone() } } -impl ::std::fmt::Debug for Monitoring { +impl ::std::fmt::Display for Monitoring { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Monitoring { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] -pub struct Monitoring_MonitoringDestination { - // message fields - pub monitored_resource: ::std::string::String, - pub metrics: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Monitoring_MonitoringDestination { - fn default() -> &'a Monitoring_MonitoringDestination { - ::default_instance() - } -} - -impl Monitoring_MonitoringDestination { - pub fn new() -> Monitoring_MonitoringDestination { - ::std::default::Default::default() - } - - // string monitored_resource = 1; - - - pub fn get_monitored_resource(&self) -> &str { - &self.monitored_resource - } - pub fn clear_monitored_resource(&mut self) { - self.monitored_resource.clear(); - } - - // Param is passed by value, moved - pub fn set_monitored_resource(&mut self, v: ::std::string::String) { - self.monitored_resource = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_monitored_resource(&mut self) -> &mut ::std::string::String { - &mut self.monitored_resource - } - - // Take field - pub fn take_monitored_resource(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.monitored_resource, ::std::string::String::new()) +/// Nested message and enums of message `Monitoring` +pub mod monitoring { + /// Configuration of a specific monitoring destination (the producer project + /// or the consumer project). + // @@protoc_insertion_point(message:google.api.Monitoring.MonitoringDestination) + #[derive(PartialEq,Clone,Default,Debug)] + pub struct MonitoringDestination { + // message fields + /// The monitored resource type. The type must be defined in + /// [Service.monitored_resources][google.api.Service.monitored_resources] + /// section. + // @@protoc_insertion_point(field:google.api.Monitoring.MonitoringDestination.monitored_resource) + pub monitored_resource: ::std::string::String, + /// Types of the metrics to report to this monitoring destination. + /// Each type must be defined in + /// [Service.metrics][google.api.Service.metrics] section. + // @@protoc_insertion_point(field:google.api.Monitoring.MonitoringDestination.metrics) + pub metrics: ::std::vec::Vec<::std::string::String>, + // special fields + // @@protoc_insertion_point(special_field:google.api.Monitoring.MonitoringDestination.special_fields) + pub special_fields: ::protobuf::SpecialFields, + } + + impl<'a> ::std::default::Default for &'a MonitoringDestination { + fn default() -> &'a MonitoringDestination { + ::default_instance() + } } - // repeated string metrics = 2; - - - pub fn get_metrics(&self) -> &[::std::string::String] { - &self.metrics - } - pub fn clear_metrics(&mut self) { - self.metrics.clear(); - } + impl MonitoringDestination { + pub fn new() -> MonitoringDestination { + ::std::default::Default::default() + } - // Param is passed by value, moved - pub fn set_metrics(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.metrics = v; + pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "monitored_resource", + |m: &MonitoringDestination| { &m.monitored_resource }, + |m: &mut MonitoringDestination| { &mut m.monitored_resource }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "metrics", + |m: &MonitoringDestination| { &m.metrics }, + |m: &mut MonitoringDestination| { &mut m.metrics }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Monitoring.MonitoringDestination", + fields, + oneofs, + ) + } } - // Mutable pointer to the field. - pub fn mut_metrics(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.metrics - } + impl ::protobuf::Message for MonitoringDestination { + const NAME: &'static str = "MonitoringDestination"; - // Take field - pub fn take_metrics(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.metrics, ::protobuf::RepeatedField::new()) - } -} + fn is_initialized(&self) -> bool { + true + } -impl ::protobuf::Message for Monitoring_MonitoringDestination { - fn is_initialized(&self) -> bool { - true - } + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.monitored_resource = is.read_string()?; + }, + 18 => { + self.metrics.push(is.read_string()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } - 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.monitored_resource)?; - }, - 2 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.metrics)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if !self.monitored_resource.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.monitored_resource); + } + for value in &self.metrics { + my_size += ::protobuf::rt::string_size(2, &value); }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size } - ::std::result::Result::Ok(()) - } - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.monitored_resource.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.monitored_resource); + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.monitored_resource.is_empty() { + os.write_string(1, &self.monitored_resource)?; + } + for v in &self.metrics { + os.write_string(2, &v)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) } - for value in &self.metrics { - 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.monitored_resource.is_empty() { - os.write_string(1, &self.monitored_resource)?; + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - for v in &self.metrics { - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } - fn new() -> Monitoring_MonitoringDestination { - Monitoring_MonitoringDestination::new() - } + fn new() -> MonitoringDestination { + MonitoringDestination::new() + } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "monitored_resource", - |m: &Monitoring_MonitoringDestination| { &m.monitored_resource }, - |m: &mut Monitoring_MonitoringDestination| { &mut m.monitored_resource }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "metrics", - |m: &Monitoring_MonitoringDestination| { &m.metrics }, - |m: &mut Monitoring_MonitoringDestination| { &mut m.metrics }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Monitoring.MonitoringDestination", - fields, - file_descriptor_proto() - ) - }) - } + fn clear(&mut self) { + self.monitored_resource.clear(); + self.metrics.clear(); + self.special_fields.clear(); + } - fn default_instance() -> &'static Monitoring_MonitoringDestination { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Monitoring_MonitoringDestination::new) + fn default_instance() -> &'static MonitoringDestination { + static instance: MonitoringDestination = MonitoringDestination { + monitored_resource: ::std::string::String::new(), + metrics: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } } -} -impl ::protobuf::Clear for Monitoring_MonitoringDestination { - fn clear(&mut self) { - self.monitored_resource.clear(); - self.metrics.clear(); - self.unknown_fields.clear(); + impl ::protobuf::MessageFull for MonitoringDestination { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Monitoring.MonitoringDestination").unwrap()).clone() + } } -} -impl ::std::fmt::Debug for Monitoring_MonitoringDestination { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) + impl ::std::fmt::Display for MonitoringDestination { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } } -} -impl ::protobuf::reflect::ProtobufValue for Monitoring_MonitoringDestination { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) + impl ::protobuf::reflect::ProtobufValue for MonitoringDestination { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } } @@ -448,7 +340,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \n\x07metrics\x18\x02\x20\x03(\tR\x07metricsBq\n\x0ecom.google.apiB\x0fM\ onitoringProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceco\ nfig;serviceconfig\xa2\x02\x04GAPIJ\xd3\x20\n\x06\x12\x04\x0e\0j\x01\n\ - \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Go\ + \xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\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\ @@ -554,14 +446,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x12\x03i!6\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03i9:b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(Monitoring::generated_message_descriptor_data()); + messages.push(monitoring::MonitoringDestination::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/policy.rs b/googleapis-raw/src/api/policy.rs index 7fce731..e31c6c1 100644 --- a/googleapis-raw/src/api/policy.rs +++ b/googleapis-raw/src/api/policy.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,30 +9,58 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/policy.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default)] +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; + +/// Google API Policy Annotation +/// +/// This message defines a simple API policy annotation that can be used to +/// annotate API request and response message fields with applicable policies. +/// One field may have multiple applicable policies that must all be satisfied +/// before a request can be processed. This policy annotation is used to +/// generate the overall policy that will be used for automatic runtime +/// policy enforcement and documentation generation. +// @@protoc_insertion_point(message:google.api.FieldPolicy) +#[derive(PartialEq,Clone,Default,Debug)] pub struct FieldPolicy { // message fields + /// Selects one or more request or response message fields to apply this + /// `FieldPolicy`. + /// + /// When a `FieldPolicy` is used in proto annotation, the selector must + /// be left as empty. The service config generator will automatically fill + /// the correct value. + /// + /// When a `FieldPolicy` is used in service config, the selector must be a + /// comma-separated string with valid request or response field paths, + /// such as "foo.bar" or "foo.bar,foo.baz". + // @@protoc_insertion_point(field:google.api.FieldPolicy.selector) pub selector: ::std::string::String, + /// Specifies the required permission(s) for the resource referred to by the + /// field. It requires the field contains a valid resource reference, and + /// the request must pass the permission checks to proceed. For example, + /// "resourcemanager.projects.get". + // @@protoc_insertion_point(field:google.api.FieldPolicy.resource_permission) pub resource_permission: ::std::string::String, + /// Specifies the resource type for the resource referred to by the field. + // @@protoc_insertion_point(field:google.api.FieldPolicy.resource_type) pub resource_type: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.FieldPolicy.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a FieldPolicy { @@ -45,105 +74,53 @@ impl FieldPolicy { ::std::default::Default::default() } - // string selector = 1; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - - // string resource_permission = 2; - - - pub fn get_resource_permission(&self) -> &str { - &self.resource_permission - } - pub fn clear_resource_permission(&mut self) { - self.resource_permission.clear(); - } - - // Param is passed by value, moved - pub fn set_resource_permission(&mut self, v: ::std::string::String) { - self.resource_permission = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_resource_permission(&mut self) -> &mut ::std::string::String { - &mut self.resource_permission - } - - // Take field - pub fn take_resource_permission(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.resource_permission, ::std::string::String::new()) - } - - // string resource_type = 3; - - - pub fn get_resource_type(&self) -> &str { - &self.resource_type - } - pub fn clear_resource_type(&mut self) { - self.resource_type.clear(); - } - - // Param is passed by value, moved - pub fn set_resource_type(&mut self, v: ::std::string::String) { - self.resource_type = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_resource_type(&mut self) -> &mut ::std::string::String { - &mut self.resource_type - } - - // Take field - pub fn take_resource_type(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.resource_type, ::std::string::String::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &FieldPolicy| { &m.selector }, + |m: &mut FieldPolicy| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "resource_permission", + |m: &FieldPolicy| { &m.resource_permission }, + |m: &mut FieldPolicy| { &mut m.resource_permission }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "resource_type", + |m: &FieldPolicy| { &m.resource_type }, + |m: &mut FieldPolicy| { &mut m.resource_type }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "FieldPolicy", + fields, + oneofs, + ) } } impl ::protobuf::Message for FieldPolicy { + const NAME: &'static str = "FieldPolicy"; + 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.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.selector = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.resource_permission)?; + 18 => { + self.resource_permission = is.read_string()?; }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.resource_type)?; + 26 => { + self.resource_type = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -152,7 +129,7 @@ impl ::protobuf::Message for FieldPolicy { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.selector); @@ -163,12 +140,12 @@ impl ::protobuf::Message for FieldPolicy { if !self.resource_type.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.resource_type); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(1, &self.selector)?; } @@ -178,102 +155,78 @@ impl ::protobuf::Message for FieldPolicy { if !self.resource_type.is_empty() { os.write_string(3, &self.resource_type)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> FieldPolicy { FieldPolicy::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &FieldPolicy| { &m.selector }, - |m: &mut FieldPolicy| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "resource_permission", - |m: &FieldPolicy| { &m.resource_permission }, - |m: &mut FieldPolicy| { &mut m.resource_permission }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "resource_type", - |m: &FieldPolicy| { &m.resource_type }, - |m: &mut FieldPolicy| { &mut m.resource_type }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "FieldPolicy", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.selector.clear(); + self.resource_permission.clear(); + self.resource_type.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static FieldPolicy { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(FieldPolicy::new) + static instance: FieldPolicy = FieldPolicy { + selector: ::std::string::String::new(), + resource_permission: ::std::string::String::new(), + resource_type: ::std::string::String::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for FieldPolicy { - fn clear(&mut self) { - self.selector.clear(); - self.resource_permission.clear(); - self.resource_type.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for FieldPolicy { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("FieldPolicy").unwrap()).clone() } } -impl ::std::fmt::Debug for FieldPolicy { +impl ::std::fmt::Display for FieldPolicy { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for FieldPolicy { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Defines policies applying to an RPC method. +// @@protoc_insertion_point(message:google.api.MethodPolicy) +#[derive(PartialEq,Clone,Default,Debug)] pub struct MethodPolicy { // message fields + /// Selects a method to which these policies should be enforced, for example, + /// "google.pubsub.v1.Subscriber.CreateSubscription". + /// + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax + /// details. + /// + /// NOTE: This field must not be set in the proto annotation. It will be + /// automatically filled by the service config compiler . + // @@protoc_insertion_point(field:google.api.MethodPolicy.selector) pub selector: ::std::string::String, - pub request_policies: ::protobuf::RepeatedField, + /// Policies that are applicable to the request message. + // @@protoc_insertion_point(field:google.api.MethodPolicy.request_policies) + pub request_policies: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.MethodPolicy.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a MethodPolicy { @@ -287,80 +240,45 @@ impl MethodPolicy { ::std::default::Default::default() } - // string selector = 9; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - - // repeated .google.api.FieldPolicy request_policies = 2; - - - pub fn get_request_policies(&self) -> &[FieldPolicy] { - &self.request_policies - } - pub fn clear_request_policies(&mut self) { - self.request_policies.clear(); - } - - // Param is passed by value, moved - pub fn set_request_policies(&mut self, v: ::protobuf::RepeatedField) { - self.request_policies = v; - } - - // Mutable pointer to the field. - pub fn mut_request_policies(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.request_policies - } - - // Take field - pub fn take_request_policies(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.request_policies, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &MethodPolicy| { &m.selector }, + |m: &mut MethodPolicy| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "request_policies", + |m: &MethodPolicy| { &m.request_policies }, + |m: &mut MethodPolicy| { &mut m.request_policies }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MethodPolicy", + fields, + oneofs, + ) } } impl ::protobuf::Message for MethodPolicy { + const NAME: &'static str = "MethodPolicy"; + fn is_initialized(&self) -> bool { - for v in &self.request_policies { - 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 { - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 74 => { + self.selector = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.request_policies)?; + 18 => { + self.request_policies.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -369,117 +287,82 @@ impl ::protobuf::Message for MethodPolicy { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(9, &self.selector); } for value in &self.request_policies { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(9, &self.selector)?; } for v in &self.request_policies { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> MethodPolicy { MethodPolicy::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &MethodPolicy| { &m.selector }, - |m: &mut MethodPolicy| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "request_policies", - |m: &MethodPolicy| { &m.request_policies }, - |m: &mut MethodPolicy| { &mut m.request_policies }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MethodPolicy", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.selector.clear(); + self.request_policies.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static MethodPolicy { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MethodPolicy::new) + static instance: MethodPolicy = MethodPolicy { + selector: ::std::string::String::new(), + request_policies: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for MethodPolicy { - fn clear(&mut self) { - self.selector.clear(); - self.request_policies.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for MethodPolicy { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MethodPolicy").unwrap()).clone() } } -impl ::std::fmt::Debug for MethodPolicy { +impl ::std::fmt::Display for MethodPolicy { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for MethodPolicy { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Extension fields pub mod exts { - pub const field_policy: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::protobuf::types::ProtobufTypeMessage> = ::protobuf::ext::ExtFieldOptional { field_number: 158361448, phantom: ::std::marker::PhantomData }; + pub const field_policy: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, super::FieldPolicy> = ::protobuf::ext::ExtFieldOptional::new(158361448, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_MESSAGE); - pub const method_policy: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MethodOptions, ::protobuf::types::ProtobufTypeMessage> = ::protobuf::ext::ExtFieldOptional { field_number: 161893301, phantom: ::std::marker::PhantomData }; + pub const method_policy: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MethodOptions, super::MethodPolicy> = ::protobuf::ext::ExtFieldOptional::new(161893301, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_MESSAGE); } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -495,8 +378,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x0b2\x18.google.api.MethodPolicy\x12\x1e.google.protobuf.MethodOptionsR\ \x0cmethodPolicyBp\n\x0ecom.google.apiB\x0bPolicyProtoP\x01ZEgoogle.gola\ ng.org/genproto/googleapis/api/serviceconfig;serviceconfig\xf8\x01\x01\ - \xa2\x02\x04GAPIJ\xe0\x17\n\x06\x12\x04\x0e\0T\x01\n\xbc\x04\n\x01\x0c\ - \x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Google\x20LLC\n\n\ + \xa2\x02\x04GAPIJ\xda\x16\n\x06\x12\x04\x0e\0R\x01\n\xbc\x04\n\x01\x0c\ + \x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20Google\x20LLC\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\ @@ -514,76 +397,93 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \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\0\"\ - \n\t\n\x02\x08$\x12\x03\x19\0\"\nK\n\x01\x07\x12\x04\x1c\0\x1f\x01\x1a@\ - \x20Provides\x20`google.api.field_policy`\x20annotation\x20at\x20proto\ - \x20fields.\n\n!\n\x02\x07\0\x12\x03\x1e\x02'\x1a\x16\x20See\x20[FieldPo\ - licy][].\n\n\n\n\x03\x07\0\x02\x12\x03\x1c\x07#\n\n\n\x03\x07\0\x06\x12\ - \x03\x1e\x02\r\n\n\n\x03\x07\0\x01\x12\x03\x1e\x0e\x1a\n\n\n\x03\x07\0\ - \x03\x12\x03\x1e\x1d&\nM\n\x01\x07\x12\x04\"\0%\x01\x1aB\x20Provides\x20\ - `google.api.method_policy`\x20annotation\x20at\x20proto\x20methods.\n\n\ - \"\n\x02\x07\x01\x12\x03$\x02)\x1a\x17\x20See\x20[MethodPolicy][].\n\n\n\ - \n\x03\x07\x01\x02\x12\x03\"\x07$\n\n\n\x03\x07\x01\x06\x12\x03$\x02\x0e\ - \n\n\n\x03\x07\x01\x01\x12\x03$\x0f\x1c\n\n\n\x03\x07\x01\x03\x12\x03$\ - \x1f(\n\xca\x03\n\x02\x04\0\x12\x04/\0D\x01\x1a\xbd\x03\x20Google\x20API\ - \x20Policy\x20Annotation\n\n\x20This\x20message\x20defines\x20a\x20simpl\ - e\x20API\x20policy\x20annotation\x20that\x20can\x20be\x20used\x20to\n\ - \x20annotate\x20API\x20request\x20and\x20response\x20message\x20fields\ - \x20with\x20applicable\x20policies.\n\x20One\x20field\x20may\x20have\x20\ - multiple\x20applicable\x20policies\x20that\x20must\x20all\x20be\x20satis\ - fied\n\x20before\x20a\x20request\x20can\x20be\x20processed.\x20This\x20p\ - olicy\x20annotation\x20is\x20used\x20to\n\x20generate\x20the\x20overall\ - \x20policy\x20that\x20will\x20be\x20used\x20for\x20automatic\x20runtime\ - \n\x20policy\x20enforcement\x20and\x20documentation\x20generation.\n\n\n\ - \n\x03\x04\0\x01\x12\x03/\x08\x13\n\xbc\x03\n\x04\x04\0\x02\0\x12\x03:\ - \x02\x16\x1a\xae\x03\x20Selects\x20one\x20or\x20more\x20request\x20or\ - \x20response\x20message\x20fields\x20to\x20apply\x20this\n\x20`FieldPoli\ - cy`.\n\n\x20When\x20a\x20`FieldPolicy`\x20is\x20used\x20in\x20proto\x20a\ - nnotation,\x20the\x20selector\x20must\n\x20be\x20left\x20as\x20empty.\ - \x20The\x20service\x20config\x20generator\x20will\x20automatically\x20fi\ - ll\n\x20the\x20correct\x20value.\n\n\x20When\x20a\x20`FieldPolicy`\x20is\ - \x20used\x20in\x20service\x20config,\x20the\x20selector\x20must\x20be\ - \x20a\n\x20comma-separated\x20string\x20with\x20valid\x20request\x20or\ - \x20response\x20field\x20paths,\n\x20such\x20as\x20\"foo.bar\"\x20or\x20\ - \"foo.bar,foo.baz\".\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03:\x02\x08\n\ - \x0c\n\x05\x04\0\x02\0\x01\x12\x03:\t\x11\n\x0c\n\x05\x04\0\x02\0\x03\ - \x12\x03:\x14\x15\n\x86\x02\n\x04\x04\0\x02\x01\x12\x03@\x02!\x1a\xf8\ - \x01\x20Specifies\x20the\x20required\x20permission(s)\x20for\x20the\x20r\ - esource\x20referred\x20to\x20by\x20the\n\x20field.\x20It\x20requires\x20\ - the\x20field\x20contains\x20a\x20valid\x20resource\x20reference,\x20and\ - \n\x20the\x20request\x20must\x20pass\x20the\x20permission\x20checks\x20t\ - o\x20proceed.\x20For\x20example,\n\x20\"resourcemanager.projects.get\".\ - \n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03@\x02\x08\n\x0c\n\x05\x04\0\x02\ - \x01\x01\x12\x03@\t\x1c\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03@\x1f\x20\n\ - U\n\x04\x04\0\x02\x02\x12\x03C\x02\x1b\x1aH\x20Specifies\x20the\x20resou\ - rce\x20type\x20for\x20the\x20resource\x20referred\x20to\x20by\x20the\x20\ - field.\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03C\x02\x08\n\x0c\n\x05\x04\ - \0\x02\x02\x01\x12\x03C\t\x16\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03C\x19\ - \x1a\n9\n\x02\x04\x01\x12\x04G\0T\x01\x1a-\x20Defines\x20policies\x20app\ - lying\x20to\x20an\x20RPC\x20method.\n\n\n\n\x03\x04\x01\x01\x12\x03G\x08\ - \x14\n\xdc\x02\n\x04\x04\x01\x02\0\x12\x03P\x02\x16\x1a\xce\x02\x20Selec\ - ts\x20a\x20method\x20to\x20which\x20these\x20policies\x20should\x20be\ - \x20enforced,\x20for\x20example,\n\x20\"google.pubsub.v1.Subscriber.Crea\ - teSubscription\".\n\n\x20Refer\x20to\x20[selector][google.api.Documentat\ - ionRule.selector]\x20for\x20syntax\n\x20details.\n\n\x20NOTE:\x20This\ - \x20field\x20must\x20not\x20be\x20set\x20in\x20the\x20proto\x20annotatio\ - n.\x20It\x20will\x20be\n\x20automatically\x20filled\x20by\x20the\x20serv\ - ice\x20config\x20compiler\x20.\n\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03P\ - \x02\x08\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03P\t\x11\n\x0c\n\x05\x04\ - \x01\x02\0\x03\x12\x03P\x14\x15\nC\n\x04\x04\x01\x02\x01\x12\x03S\x02,\ - \x1a6\x20Policies\x20that\x20are\x20applicable\x20to\x20the\x20request\ - \x20message.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03S\x02\n\n\x0c\n\ - \x05\x04\x01\x02\x01\x06\x12\x03S\x0b\x16\n\x0c\n\x05\x04\x01\x02\x01\ - \x01\x12\x03S\x17'\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03S*+b\x06proto3\ + \n\t\n\x02\x08$\x12\x03\x19\0\"\n\t\n\x01\x07\x12\x04\x1b\0\x1e\x01\n!\n\ + \x02\x07\0\x12\x03\x1d\x022\x1a\x16\x20See\x20[FieldPolicy][].\n\n\n\n\ + \x03\x07\0\x02\x12\x03\x1b\x07#\n\n\n\x03\x07\0\x06\x12\x03\x1d\x02\x18\ + \n\n\n\x03\x07\0\x01\x12\x03\x1d\x19%\n\n\n\x03\x07\0\x03\x12\x03\x1d(1\ + \n\t\n\x01\x07\x12\x04\x20\0#\x01\n\"\n\x02\x07\x01\x12\x03\"\x024\x1a\ + \x17\x20See\x20[MethodPolicy][].\n\n\n\n\x03\x07\x01\x02\x12\x03\x20\x07\ + $\n\n\n\x03\x07\x01\x06\x12\x03\"\x02\x19\n\n\n\x03\x07\x01\x01\x12\x03\ + \"\x1a'\n\n\n\x03\x07\x01\x03\x12\x03\"*3\n\xca\x03\n\x02\x04\0\x12\x04-\ + \0B\x01\x1a\xbd\x03\x20Google\x20API\x20Policy\x20Annotation\n\n\x20This\ + \x20message\x20defines\x20a\x20simple\x20API\x20policy\x20annotation\x20\ + that\x20can\x20be\x20used\x20to\n\x20annotate\x20API\x20request\x20and\ + \x20response\x20message\x20fields\x20with\x20applicable\x20policies.\n\ + \x20One\x20field\x20may\x20have\x20multiple\x20applicable\x20policies\ + \x20that\x20must\x20all\x20be\x20satisfied\n\x20before\x20a\x20request\ + \x20can\x20be\x20processed.\x20This\x20policy\x20annotation\x20is\x20use\ + d\x20to\n\x20generate\x20the\x20overall\x20policy\x20that\x20will\x20be\ + \x20used\x20for\x20automatic\x20runtime\n\x20policy\x20enforcement\x20an\ + d\x20documentation\x20generation.\n\n\n\n\x03\x04\0\x01\x12\x03-\x08\x13\ + \n\xbc\x03\n\x04\x04\0\x02\0\x12\x038\x02\x16\x1a\xae\x03\x20Selects\x20\ + one\x20or\x20more\x20request\x20or\x20response\x20message\x20fields\x20t\ + o\x20apply\x20this\n\x20`FieldPolicy`.\n\n\x20When\x20a\x20`FieldPolicy`\ + \x20is\x20used\x20in\x20proto\x20annotation,\x20the\x20selector\x20must\ + \n\x20be\x20left\x20as\x20empty.\x20The\x20service\x20config\x20generato\ + r\x20will\x20automatically\x20fill\n\x20the\x20correct\x20value.\n\n\x20\ + When\x20a\x20`FieldPolicy`\x20is\x20used\x20in\x20service\x20config,\x20\ + the\x20selector\x20must\x20be\x20a\n\x20comma-separated\x20string\x20wit\ + h\x20valid\x20request\x20or\x20response\x20field\x20paths,\n\x20such\x20\ + as\x20\"foo.bar\"\x20or\x20\"foo.bar,foo.baz\".\n\n\x0c\n\x05\x04\0\x02\ + \0\x05\x12\x038\x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\x12\x038\t\x11\n\x0c\ + \n\x05\x04\0\x02\0\x03\x12\x038\x14\x15\n\x86\x02\n\x04\x04\0\x02\x01\ + \x12\x03>\x02!\x1a\xf8\x01\x20Specifies\x20the\x20required\x20permission\ + (s)\x20for\x20the\x20resource\x20referred\x20to\x20by\x20the\n\x20field.\ + \x20It\x20requires\x20the\x20field\x20contains\x20a\x20valid\x20resource\ + \x20reference,\x20and\n\x20the\x20request\x20must\x20pass\x20the\x20perm\ + ission\x20checks\x20to\x20proceed.\x20For\x20example,\n\x20\"resourceman\ + ager.projects.get\".\n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03>\x02\x08\n\ + \x0c\n\x05\x04\0\x02\x01\x01\x12\x03>\t\x1c\n\x0c\n\x05\x04\0\x02\x01\ + \x03\x12\x03>\x1f\x20\nU\n\x04\x04\0\x02\x02\x12\x03A\x02\x1b\x1aH\x20Sp\ + ecifies\x20the\x20resource\x20type\x20for\x20the\x20resource\x20referred\ + \x20to\x20by\x20the\x20field.\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03A\ + \x02\x08\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03A\t\x16\n\x0c\n\x05\x04\0\ + \x02\x02\x03\x12\x03A\x19\x1a\n9\n\x02\x04\x01\x12\x04E\0R\x01\x1a-\x20D\ + efines\x20policies\x20applying\x20to\x20an\x20RPC\x20method.\n\n\n\n\x03\ + \x04\x01\x01\x12\x03E\x08\x14\n\xdc\x02\n\x04\x04\x01\x02\0\x12\x03N\x02\ + \x16\x1a\xce\x02\x20Selects\x20a\x20method\x20to\x20which\x20these\x20po\ + licies\x20should\x20be\x20enforced,\x20for\x20example,\n\x20\"google.pub\ + sub.v1.Subscriber.CreateSubscription\".\n\n\x20Refer\x20to\x20[selector]\ + [google.api.DocumentationRule.selector]\x20for\x20syntax\n\x20details.\n\ + \n\x20NOTE:\x20This\x20field\x20must\x20not\x20be\x20set\x20in\x20the\ + \x20proto\x20annotation.\x20It\x20will\x20be\n\x20automatically\x20fille\ + d\x20by\x20the\x20service\x20config\x20compiler\x20.\n\n\x0c\n\x05\x04\ + \x01\x02\0\x05\x12\x03N\x02\x08\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03N\t\ + \x11\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03N\x14\x15\nC\n\x04\x04\x01\x02\ + \x01\x12\x03Q\x02,\x1a6\x20Policies\x20that\x20are\x20applicable\x20to\ + \x20the\x20request\x20message.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03\ + Q\x02\n\n\x0c\n\x05\x04\x01\x02\x01\x06\x12\x03Q\x0b\x16\n\x0c\n\x05\x04\ + \x01\x02\x01\x01\x12\x03Q\x17'\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03Q*\ + +b\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(1); + deps.push(::protobuf::descriptor::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(2); + messages.push(FieldPolicy::generated_message_descriptor_data()); + messages.push(MethodPolicy::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/quota.rs b/googleapis-raw/src/api/quota.rs index 98250e1..9352ca7 100644 --- a/googleapis-raw/src/api/quota.rs +++ b/googleapis-raw/src/api/quota.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,29 +9,36 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/quota.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.Quota) +#[derive(PartialEq,Clone,Default,Debug)] pub struct Quota { // message fields - pub limits: ::protobuf::RepeatedField, - pub metric_rules: ::protobuf::RepeatedField, + /// List of QuotaLimit definitions for the service. + // @@protoc_insertion_point(field:google.api.Quota.limits) + pub limits: ::std::vec::Vec, + /// List of MetricRule definitions, each one mapping a selected method to one + /// or more metrics. + // @@protoc_insertion_point(field:google.api.Quota.metric_rules) + pub metric_rules: ::std::vec::Vec, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.Quota.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a Quota { @@ -44,84 +52,45 @@ impl Quota { ::std::default::Default::default() } - // repeated .google.api.QuotaLimit limits = 3; - - - pub fn get_limits(&self) -> &[QuotaLimit] { - &self.limits - } - pub fn clear_limits(&mut self) { - self.limits.clear(); - } - - // Param is passed by value, moved - pub fn set_limits(&mut self, v: ::protobuf::RepeatedField) { - self.limits = v; - } - - // Mutable pointer to the field. - pub fn mut_limits(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.limits - } - - // Take field - pub fn take_limits(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.limits, ::protobuf::RepeatedField::new()) - } - - // repeated .google.api.MetricRule metric_rules = 4; - - - pub fn get_metric_rules(&self) -> &[MetricRule] { - &self.metric_rules - } - pub fn clear_metric_rules(&mut self) { - self.metric_rules.clear(); - } - - // Param is passed by value, moved - pub fn set_metric_rules(&mut self, v: ::protobuf::RepeatedField) { - self.metric_rules = v; - } - - // Mutable pointer to the field. - pub fn mut_metric_rules(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.metric_rules - } - - // Take field - pub fn take_metric_rules(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.metric_rules, ::protobuf::RepeatedField::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "limits", + |m: &Quota| { &m.limits }, + |m: &mut Quota| { &mut m.limits }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "metric_rules", + |m: &Quota| { &m.metric_rules }, + |m: &mut Quota| { &mut m.metric_rules }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "Quota", + fields, + oneofs, + ) } } impl ::protobuf::Message for Quota { + const NAME: &'static str = "Quota"; + fn is_initialized(&self) -> bool { - for v in &self.limits { - if !v.is_initialized() { - return false; - } - }; - for v in &self.metric_rules { - 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 { - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.limits)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 26 => { + self.limits.push(is.read_message()?); }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.metric_rules)?; + 34 => { + self.metric_rules.push(is.read_message()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -130,122 +99,100 @@ impl ::protobuf::Message for Quota { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.limits { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; for value in &self.metric_rules { let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.limits { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; }; for v in &self.metric_rules { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; + ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> Quota { Quota::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "limits", - |m: &Quota| { &m.limits }, - |m: &mut Quota| { &mut m.limits }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "metric_rules", - |m: &Quota| { &m.metric_rules }, - |m: &mut Quota| { &mut m.metric_rules }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Quota", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.limits.clear(); + self.metric_rules.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static Quota { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Quota::new) + static instance: Quota = Quota { + limits: ::std::vec::Vec::new(), + metric_rules: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::protobuf::Clear for Quota { - fn clear(&mut self) { - self.limits.clear(); - self.metric_rules.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for Quota { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("Quota").unwrap()).clone() } } -impl ::std::fmt::Debug for Quota { +impl ::std::fmt::Display for Quota { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for Quota { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// Bind API methods to metrics. Binding a method to a metric causes that +/// metric's configured quota behaviors to apply to the method call. +// @@protoc_insertion_point(message:google.api.MetricRule) +#[derive(PartialEq,Clone,Default,Debug)] pub struct MetricRule { // message fields + /// Selects the methods to which this rule applies. + /// + /// Refer to [selector][google.api.DocumentationRule.selector] for syntax + /// details. + // @@protoc_insertion_point(field:google.api.MetricRule.selector) pub selector: ::std::string::String, + /// Metrics to update when the selected methods are called, and the associated + /// cost applied to each metric. + /// + /// The key of the map is the metric name, and the values are the amount + /// increased for the metric against which the quota limits are defined. + /// The value must not be negative. + // @@protoc_insertion_point(field:google.api.MetricRule.metric_costs) pub metric_costs: ::std::collections::HashMap<::std::string::String, i64>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.MetricRule.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a MetricRule { @@ -259,75 +206,57 @@ impl MetricRule { ::std::default::Default::default() } - // string selector = 1; - - - pub fn get_selector(&self) -> &str { - &self.selector - } - pub fn clear_selector(&mut self) { - self.selector.clear(); - } - - // Param is passed by value, moved - pub fn set_selector(&mut self, v: ::std::string::String) { - self.selector = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_selector(&mut self) -> &mut ::std::string::String { - &mut self.selector - } - - // Take field - pub fn take_selector(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.selector, ::std::string::String::new()) - } - - // repeated .google.api.MetricRule.MetricCostsEntry metric_costs = 2; - - - pub fn get_metric_costs(&self) -> &::std::collections::HashMap<::std::string::String, i64> { - &self.metric_costs - } - pub fn clear_metric_costs(&mut self) { - self.metric_costs.clear(); - } - - // Param is passed by value, moved - pub fn set_metric_costs(&mut self, v: ::std::collections::HashMap<::std::string::String, i64>) { - self.metric_costs = v; - } - - // Mutable pointer to the field. - pub fn mut_metric_costs(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, i64> { - &mut self.metric_costs - } - - // Take field - pub fn take_metric_costs(&mut self) -> ::std::collections::HashMap<::std::string::String, i64> { - ::std::mem::replace(&mut self.metric_costs, ::std::collections::HashMap::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "selector", + |m: &MetricRule| { &m.selector }, + |m: &mut MetricRule| { &mut m.selector }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "metric_costs", + |m: &MetricRule| { &m.metric_costs }, + |m: &mut MetricRule| { &mut m.metric_costs }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MetricRule", + fields, + oneofs, + ) } } impl ::protobuf::Message for MetricRule { + const NAME: &'static str = "MetricRule"; + 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.selector)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.selector = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeInt64>(wire_type, is, &mut self.metric_costs)?; + 18 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 16 => value = is.read_int64()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.metric_costs.insert(key, value); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -336,120 +265,168 @@ impl ::protobuf::Message for MetricRule { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.selector.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.selector); } - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeInt64>(2, &self.metric_costs); - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + for (k, v) in &self.metric_costs { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::int64_size(2, *v); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.selector.is_empty() { os.write_string(1, &self.selector)?; } - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeInt64>(2, &self.metric_costs, os)?; - os.write_unknown_fields(self.get_unknown_fields())?; + for (k, v) in &self.metric_costs { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::int64_size(2, *v); + os.write_raw_varint32(18)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + os.write_int64(2, *v)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> MetricRule { MetricRule::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "selector", - |m: &MetricRule| { &m.selector }, - |m: &mut MetricRule| { &mut m.selector }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeInt64>( - "metric_costs", - |m: &MetricRule| { &m.metric_costs }, - |m: &mut MetricRule| { &mut m.metric_costs }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "MetricRule", - fields, - file_descriptor_proto() - ) - }) + fn clear(&mut self) { + self.selector.clear(); + self.metric_costs.clear(); + self.special_fields.clear(); } fn default_instance() -> &'static MetricRule { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); instance.get(MetricRule::new) } } -impl ::protobuf::Clear for MetricRule { - fn clear(&mut self) { - self.selector.clear(); - self.metric_costs.clear(); - self.unknown_fields.clear(); +impl ::protobuf::MessageFull for MetricRule { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MetricRule").unwrap()).clone() } } -impl ::std::fmt::Debug for MetricRule { +impl ::std::fmt::Display for MetricRule { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for MetricRule { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(PartialEq,Clone,Default)] +/// `QuotaLimit` defines a specific limit that applies over a specified duration +/// for a limit type. There can be at most one limit for a duration and limit +/// type combination defined within a `QuotaGroup`. +// @@protoc_insertion_point(message:google.api.QuotaLimit) +#[derive(PartialEq,Clone,Default,Debug)] pub struct QuotaLimit { // message fields + /// Name of the quota limit. + /// + /// The name must be provided, and it must be unique within the service. The + /// name can only include alphanumeric characters as well as '-'. + /// + /// The maximum length of the limit name is 64 characters. + // @@protoc_insertion_point(field:google.api.QuotaLimit.name) pub name: ::std::string::String, + /// Optional. User-visible, extended description for this quota limit. + /// Should be used only when more context is needed to understand this limit + /// than provided by the limit's display name (see: `display_name`). + // @@protoc_insertion_point(field:google.api.QuotaLimit.description) pub description: ::std::string::String, + /// Default number of tokens that can be consumed during the specified + /// duration. This is the number of tokens assigned when a client + /// application developer activates the service for his/her project. + /// + /// Specifying a value of 0 will block all requests. This can be used if you + /// are provisioning quota to selected consumers and blocking others. + /// Similarly, a value of -1 will indicate an unlimited quota. No other + /// negative values are allowed. + /// + /// Used by group-based quotas only. + // @@protoc_insertion_point(field:google.api.QuotaLimit.default_limit) pub default_limit: i64, + /// Maximum number of tokens that can be consumed during the specified + /// duration. Client application developers can override the default limit up + /// to this maximum. If specified, this value cannot be set to a value less + /// than the default limit. If not specified, it is set to the default limit. + /// + /// To allow clients to apply overrides with no upper bound, set this to -1, + /// indicating unlimited maximum quota. + /// + /// Used by group-based quotas only. + // @@protoc_insertion_point(field:google.api.QuotaLimit.max_limit) pub max_limit: i64, + /// Free tier value displayed in the Developers Console for this limit. + /// The free tier is the number of tokens that will be subtracted from the + /// billed amount when billing is enabled. + /// This field can only be set on a limit with duration "1d", in a billable + /// group; it is invalid on any other limit. If this field is not set, it + /// defaults to 0, indicating that there is no free tier for this service. + /// + /// Used by group-based quotas only. + // @@protoc_insertion_point(field:google.api.QuotaLimit.free_tier) pub free_tier: i64, + /// Duration of this limit in textual notation. Must be "100s" or "1d". + /// + /// Used by group-based quotas only. + // @@protoc_insertion_point(field:google.api.QuotaLimit.duration) pub duration: ::std::string::String, + /// The name of the metric this quota limit applies to. The quota limits with + /// the same metric will be checked together during runtime. The metric must be + /// defined within the service config. + // @@protoc_insertion_point(field:google.api.QuotaLimit.metric) pub metric: ::std::string::String, + /// Specify the unit of the quota limit. It uses the same syntax as + /// [Metric.unit][]. The supported unit kinds are determined by the quota + /// backend system. + /// + /// Here are some examples: + /// * "1/min/{project}" for quota per minute per project. + /// + /// Note: the order of unit components is insignificant. + /// The "1" at the beginning is required to follow the metric unit syntax. + // @@protoc_insertion_point(field:google.api.QuotaLimit.unit) pub unit: ::std::string::String, + /// Tiered limit values. You must specify this as a key:value pair, with an + /// integer value that is the maximum number of requests allowed for the + /// specified unit. Currently only STANDARD is supported. + // @@protoc_insertion_point(field:google.api.QuotaLimit.values) pub values: ::std::collections::HashMap<::std::string::String, i64>, + /// User-visible display name for this limit. + /// Optional. If not set, the UI will provide a default display name based on + /// the quota configuration. This field can be used to override the default + /// display name generated from the configuration. + // @@protoc_insertion_point(field:google.api.QuotaLimit.display_name) pub display_name: ::std::string::String, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.QuotaLimit.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a QuotaLimit { @@ -463,286 +440,121 @@ impl QuotaLimit { ::std::default::Default::default() } - // string name = 6; - - - 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 description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // int64 default_limit = 3; - - - pub fn get_default_limit(&self) -> i64 { - self.default_limit - } - pub fn clear_default_limit(&mut self) { - self.default_limit = 0; - } - - // Param is passed by value, moved - pub fn set_default_limit(&mut self, v: i64) { - self.default_limit = v; - } - - // int64 max_limit = 4; - - - pub fn get_max_limit(&self) -> i64 { - self.max_limit - } - pub fn clear_max_limit(&mut self) { - self.max_limit = 0; - } - - // Param is passed by value, moved - pub fn set_max_limit(&mut self, v: i64) { - self.max_limit = v; - } - - // int64 free_tier = 7; - - - pub fn get_free_tier(&self) -> i64 { - self.free_tier - } - pub fn clear_free_tier(&mut self) { - self.free_tier = 0; - } - - // Param is passed by value, moved - pub fn set_free_tier(&mut self, v: i64) { - self.free_tier = v; - } - - // string duration = 5; - - - pub fn get_duration(&self) -> &str { - &self.duration - } - pub fn clear_duration(&mut self) { - self.duration.clear(); - } - - // Param is passed by value, moved - pub fn set_duration(&mut self, v: ::std::string::String) { - self.duration = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_duration(&mut self) -> &mut ::std::string::String { - &mut self.duration - } - - // Take field - pub fn take_duration(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.duration, ::std::string::String::new()) - } - - // string metric = 8; - - - pub fn get_metric(&self) -> &str { - &self.metric - } - pub fn clear_metric(&mut self) { - self.metric.clear(); - } - - // Param is passed by value, moved - pub fn set_metric(&mut self, v: ::std::string::String) { - self.metric = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_metric(&mut self) -> &mut ::std::string::String { - &mut self.metric - } - - // Take field - pub fn take_metric(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.metric, ::std::string::String::new()) - } - - // string unit = 9; - - - pub fn get_unit(&self) -> &str { - &self.unit - } - pub fn clear_unit(&mut self) { - self.unit.clear(); - } - - // Param is passed by value, moved - pub fn set_unit(&mut self, v: ::std::string::String) { - self.unit = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_unit(&mut self) -> &mut ::std::string::String { - &mut self.unit - } - - // Take field - pub fn take_unit(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.unit, ::std::string::String::new()) - } - - // repeated .google.api.QuotaLimit.ValuesEntry values = 10; - - - pub fn get_values(&self) -> &::std::collections::HashMap<::std::string::String, i64> { - &self.values - } - pub fn clear_values(&mut self) { - self.values.clear(); - } - - // Param is passed by value, moved - pub fn set_values(&mut self, v: ::std::collections::HashMap<::std::string::String, i64>) { - self.values = v; - } - - // Mutable pointer to the field. - pub fn mut_values(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, i64> { - &mut self.values - } - - // Take field - pub fn take_values(&mut self) -> ::std::collections::HashMap<::std::string::String, i64> { - ::std::mem::replace(&mut self.values, ::std::collections::HashMap::new()) - } - - // string display_name = 12; - - - 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()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(10); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name", + |m: &QuotaLimit| { &m.name }, + |m: &mut QuotaLimit| { &mut m.name }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "description", + |m: &QuotaLimit| { &m.description }, + |m: &mut QuotaLimit| { &mut m.description }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "default_limit", + |m: &QuotaLimit| { &m.default_limit }, + |m: &mut QuotaLimit| { &mut m.default_limit }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "max_limit", + |m: &QuotaLimit| { &m.max_limit }, + |m: &mut QuotaLimit| { &mut m.max_limit }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "free_tier", + |m: &QuotaLimit| { &m.free_tier }, + |m: &mut QuotaLimit| { &mut m.free_tier }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "duration", + |m: &QuotaLimit| { &m.duration }, + |m: &mut QuotaLimit| { &mut m.duration }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "metric", + |m: &QuotaLimit| { &m.metric }, + |m: &mut QuotaLimit| { &mut m.metric }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "unit", + |m: &QuotaLimit| { &m.unit }, + |m: &mut QuotaLimit| { &mut m.unit }, + )); + fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( + "values", + |m: &QuotaLimit| { &m.values }, + |m: &mut QuotaLimit| { &mut m.values }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "display_name", + |m: &QuotaLimit| { &m.display_name }, + |m: &mut QuotaLimit| { &mut m.display_name }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "QuotaLimit", + fields, + oneofs, + ) } } impl ::protobuf::Message for QuotaLimit { + const NAME: &'static str = "QuotaLimit"; + 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 { - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 50 => { + self.name = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; + 18 => { + self.description = is.read_string()?; }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.default_limit = tmp; + 24 => { + self.default_limit = is.read_int64()?; }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.max_limit = tmp; + 32 => { + self.max_limit = is.read_int64()?; }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.free_tier = tmp; + 56 => { + self.free_tier = is.read_int64()?; }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.duration)?; + 42 => { + self.duration = is.read_string()?; }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.metric)?; + 66 => { + self.metric = is.read_string()?; }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.unit)?; + 74 => { + self.unit = is.read_string()?; }, - 10 => { - ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeInt64>(wire_type, is, &mut self.values)?; + 82 => { + let len = is.read_raw_varint32()?; + let old_limit = is.push_limit(len as u64)?; + let mut key = ::std::default::Default::default(); + let mut value = ::std::default::Default::default(); + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => key = is.read_string()?, + 16 => value = is.read_int64()?, + _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, + }; + } + is.pop_limit(old_limit); + self.values.insert(key, value); }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.display_name)?; + 98 => { + self.display_name = is.read_string()?; }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -751,7 +563,7 @@ impl ::protobuf::Message for QuotaLimit { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.name.is_empty() { my_size += ::protobuf::rt::string_size(6, &self.name); @@ -760,13 +572,13 @@ impl ::protobuf::Message for QuotaLimit { my_size += ::protobuf::rt::string_size(2, &self.description); } if self.default_limit != 0 { - my_size += ::protobuf::rt::value_size(3, self.default_limit, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::int64_size(3, self.default_limit); } if self.max_limit != 0 { - my_size += ::protobuf::rt::value_size(4, self.max_limit, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::int64_size(4, self.max_limit); } if self.free_tier != 0 { - my_size += ::protobuf::rt::value_size(7, self.free_tier, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::int64_size(7, self.free_tier); } if !self.duration.is_empty() { my_size += ::protobuf::rt::string_size(5, &self.duration); @@ -777,16 +589,21 @@ impl ::protobuf::Message for QuotaLimit { if !self.unit.is_empty() { my_size += ::protobuf::rt::string_size(9, &self.unit); } - my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeInt64>(10, &self.values); + for (k, v) in &self.values { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::int64_size(2, *v); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size + }; if !self.display_name.is_empty() { my_size += ::protobuf::rt::string_size(12, &self.display_name); } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if !self.name.is_empty() { os.write_string(6, &self.name)?; } @@ -811,113 +628,34 @@ impl ::protobuf::Message for QuotaLimit { if !self.unit.is_empty() { os.write_string(9, &self.unit)?; } - ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeInt64>(10, &self.values, os)?; + for (k, v) in &self.values { + let mut entry_size = 0; + entry_size += ::protobuf::rt::string_size(1, &k); + entry_size += ::protobuf::rt::int64_size(2, *v); + os.write_raw_varint32(82)?; // Tag. + os.write_raw_varint32(entry_size as u32)?; + os.write_string(1, &k)?; + os.write_int64(2, *v)?; + }; if !self.display_name.is_empty() { os.write_string(12, &self.display_name)?; } - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } - fn get_cached_size(&self) -> u32 { - self.cached_size.get() + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - 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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> QuotaLimit { QuotaLimit::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &QuotaLimit| { &m.name }, - |m: &mut QuotaLimit| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "description", - |m: &QuotaLimit| { &m.description }, - |m: &mut QuotaLimit| { &mut m.description }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "default_limit", - |m: &QuotaLimit| { &m.default_limit }, - |m: &mut QuotaLimit| { &mut m.default_limit }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "max_limit", - |m: &QuotaLimit| { &m.max_limit }, - |m: &mut QuotaLimit| { &mut m.max_limit }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "free_tier", - |m: &QuotaLimit| { &m.free_tier }, - |m: &mut QuotaLimit| { &mut m.free_tier }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "duration", - |m: &QuotaLimit| { &m.duration }, - |m: &mut QuotaLimit| { &mut m.duration }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "metric", - |m: &QuotaLimit| { &m.metric }, - |m: &mut QuotaLimit| { &mut m.metric }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "unit", - |m: &QuotaLimit| { &m.unit }, - |m: &mut QuotaLimit| { &mut m.unit }, - )); - fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeInt64>( - "values", - |m: &QuotaLimit| { &m.values }, - |m: &mut QuotaLimit| { &mut m.values }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "display_name", - |m: &QuotaLimit| { &m.display_name }, - |m: &mut QuotaLimit| { &mut m.display_name }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "QuotaLimit", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static QuotaLimit { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(QuotaLimit::new) - } -} - -impl ::protobuf::Clear for QuotaLimit { fn clear(&mut self) { self.name.clear(); self.description.clear(); @@ -929,20 +667,30 @@ impl ::protobuf::Clear for QuotaLimit { self.unit.clear(); self.values.clear(); self.display_name.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static QuotaLimit { + static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); + instance.get(QuotaLimit::new) + } +} + +impl ::protobuf::MessageFull for QuotaLimit { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("QuotaLimit").unwrap()).clone() } } -impl ::std::fmt::Debug for QuotaLimit { +impl ::std::fmt::Display for QuotaLimit { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for QuotaLimit { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ @@ -966,7 +714,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20\x01(\x03R\x05value:\x028\x01Bl\n\x0ecom.google.apiB\nQuotaProtoP\ \x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;servicecon\ fig\xa2\x02\x04GAPIJ\xa17\n\x07\x12\x05\x0e\0\xb7\x01\x01\n\xbc\x04\n\ - \x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202023\x20Google\x20LL\ + \x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Copyright\x202024\x20Google\x20LL\ C\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\ @@ -1152,14 +900,33 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x01\x18\x1ab\x06proto3\ "; -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) } -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(0); + let mut messages = ::std::vec::Vec::with_capacity(3); + messages.push(Quota::generated_message_descriptor_data()); + messages.push(MetricRule::generated_message_descriptor_data()); + messages.push(QuotaLimit::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) } diff --git a/googleapis-raw/src/api/resource.rs b/googleapis-raw/src/api/resource.rs index 5f38295..c2007aa 100644 --- a/googleapis-raw/src/api/resource.rs +++ b/googleapis-raw/src/api/resource.rs @@ -1,4 +1,5 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit +// This file is generated by rust-protobuf 3.4.0. Do not edit +// .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -8,34 +9,74 @@ #![allow(unused_attributes)] #![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(unused_imports)] #![allow(unused_results)] +#![allow(unused_mut)] + //! Generated file from `google/api/resource.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; -#[derive(PartialEq,Clone,Default)] +// @@protoc_insertion_point(message:google.api.ResourceDescriptor) +#[derive(PartialEq,Clone,Default,Debug)] pub struct ResourceDescriptor { // message fields - pub field_type: ::std::string::String, - pub pattern: ::protobuf::RepeatedField<::std::string::String>, + /// The resource type. It must be in the format of + /// {service_name}/{resource_type_kind}. The `resource_type_kind` must be + /// singular and must not include version numbers. + /// + /// Example: `storage.googleapis.com/Bucket` + /// + /// The value of the resource_type_kind must follow the regular expression + /// /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + /// should use PascalCase (UpperCamelCase). The maximum number of + /// characters allowed for the `resource_type_kind` is 100. + // @@protoc_insertion_point(field:google.api.ResourceDescriptor.type) + pub type_: ::std::string::String, + // @@protoc_insertion_point(field:google.api.ResourceDescriptor.pattern) + pub pattern: ::std::vec::Vec<::std::string::String>, + /// Optional. The field on the resource that designates the resource name + /// field. If omitted, this is assumed to be "name". + // @@protoc_insertion_point(field:google.api.ResourceDescriptor.name_field) pub name_field: ::std::string::String, - pub history: ResourceDescriptor_History, + // @@protoc_insertion_point(field:google.api.ResourceDescriptor.history) + pub history: ::protobuf::EnumOrUnknown, + /// The plural name used in the resource name and permission names, such as + /// 'projects' for the resource name of 'projects/{project}' and the permission + /// name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + /// to this is for Nested Collections that have stuttering names, as defined + /// in [AIP-122](https://google.aip.dev/122#nested-collections), where the + /// collection ID in the resource name pattern does not necessarily directly + /// match the `plural` value. + /// + /// It is the same concept of the `plural` field in k8s CRD spec + /// https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + /// + /// Note: The plural form is required even for singleton resources. See + /// https://aip.dev/156 + // @@protoc_insertion_point(field:google.api.ResourceDescriptor.plural) pub plural: ::std::string::String, + /// The same concept of the `singular` field in k8s CRD spec + /// https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + /// Such as "project" for the `resourcemanager.googleapis.com/Project` type. + // @@protoc_insertion_point(field:google.api.ResourceDescriptor.singular) pub singular: ::std::string::String, - pub style: ::std::vec::Vec, + /// Style flag(s) for this resource. + /// These indicate that a resource is expected to conform to a given + /// style. See the specific style flags for additional information. + // @@protoc_insertion_point(field:google.api.ResourceDescriptor.style) + pub style: ::std::vec::Vec<::protobuf::EnumOrUnknown>, // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, + // @@protoc_insertion_point(special_field:google.api.ResourceDescriptor.special_fields) + pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ResourceDescriptor { @@ -49,208 +90,88 @@ impl ResourceDescriptor { ::std::default::Default::default() } - // string type = 1; - - - pub fn get_field_type(&self) -> &str { - &self.field_type - } - pub fn clear_field_type(&mut self) { - self.field_type.clear(); - } - - // Param is passed by value, moved - pub fn set_field_type(&mut self, v: ::std::string::String) { - self.field_type = 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 ::std::string::String { - &mut self.field_type - } - - // Take field - pub fn take_field_type(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.field_type, ::std::string::String::new()) - } - - // repeated string pattern = 2; - - - pub fn get_pattern(&self) -> &[::std::string::String] { - &self.pattern - } - pub fn clear_pattern(&mut self) { - self.pattern.clear(); - } - - // Param is passed by value, moved - pub fn set_pattern(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.pattern = v; - } - - // Mutable pointer to the field. - pub fn mut_pattern(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.pattern - } - - // Take field - pub fn take_pattern(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.pattern, ::protobuf::RepeatedField::new()) - } - - // string name_field = 3; - - - pub fn get_name_field(&self) -> &str { - &self.name_field - } - pub fn clear_name_field(&mut self) { - self.name_field.clear(); - } - - // Param is passed by value, moved - pub fn set_name_field(&mut self, v: ::std::string::String) { - self.name_field = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name_field(&mut self) -> &mut ::std::string::String { - &mut self.name_field - } - - // Take field - pub fn take_name_field(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name_field, ::std::string::String::new()) - } - - // .google.api.ResourceDescriptor.History history = 4; - - - pub fn get_history(&self) -> ResourceDescriptor_History { - self.history - } - pub fn clear_history(&mut self) { - self.history = ResourceDescriptor_History::HISTORY_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_history(&mut self, v: ResourceDescriptor_History) { - self.history = v; - } - - // string plural = 5; - - - pub fn get_plural(&self) -> &str { - &self.plural - } - pub fn clear_plural(&mut self) { - self.plural.clear(); - } - - // Param is passed by value, moved - pub fn set_plural(&mut self, v: ::std::string::String) { - self.plural = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_plural(&mut self) -> &mut ::std::string::String { - &mut self.plural - } - - // Take field - pub fn take_plural(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.plural, ::std::string::String::new()) - } - - // string singular = 6; - - - pub fn get_singular(&self) -> &str { - &self.singular - } - pub fn clear_singular(&mut self) { - self.singular.clear(); - } - - // Param is passed by value, moved - pub fn set_singular(&mut self, v: ::std::string::String) { - self.singular = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_singular(&mut self) -> &mut ::std::string::String { - &mut self.singular - } - - // Take field - pub fn take_singular(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.singular, ::std::string::String::new()) - } - - // repeated .google.api.ResourceDescriptor.Style style = 10; - - - pub fn get_style(&self) -> &[ResourceDescriptor_Style] { - &self.style - } - pub fn clear_style(&mut self) { - self.style.clear(); - } - - // Param is passed by value, moved - pub fn set_style(&mut self, v: ::std::vec::Vec) { - self.style = v; - } - - // Mutable pointer to the field. - pub fn mut_style(&mut self) -> &mut ::std::vec::Vec { - &mut self.style - } - - // Take field - pub fn take_style(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.style, ::std::vec::Vec::new()) + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(7); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "type", + |m: &ResourceDescriptor| { &m.type_ }, + |m: &mut ResourceDescriptor| { &mut m.type_ }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "pattern", + |m: &ResourceDescriptor| { &m.pattern }, + |m: &mut ResourceDescriptor| { &mut m.pattern }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "name_field", + |m: &ResourceDescriptor| { &m.name_field }, + |m: &mut ResourceDescriptor| { &mut m.name_field }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "history", + |m: &ResourceDescriptor| { &m.history }, + |m: &mut ResourceDescriptor| { &mut m.history }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "plural", + |m: &ResourceDescriptor| { &m.plural }, + |m: &mut ResourceDescriptor| { &mut m.plural }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "singular", + |m: &ResourceDescriptor| { &m.singular }, + |m: &mut ResourceDescriptor| { &mut m.singular }, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "style", + |m: &ResourceDescriptor| { &m.style }, + |m: &mut ResourceDescriptor| { &mut m.style }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "ResourceDescriptor", + fields, + oneofs, + ) } } impl ::protobuf::Message for ResourceDescriptor { + const NAME: &'static str = "ResourceDescriptor"; + 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.field_type)?; + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.type_ = is.read_string()?; }, - 2 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.pattern)?; + 18 => { + self.pattern.push(is.read_string()?); }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name_field)?; + 26 => { + self.name_field = is.read_string()?; }, - 4 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.history, 4, &mut self.unknown_fields)? + 32 => { + self.history = is.read_enum_or_unknown()?; }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.plural)?; + 42 => { + self.plural = is.read_string()?; }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.singular)?; + 50 => { + self.singular = is.read_string()?; }, - 10 => { - ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.style, 10, &mut self.unknown_fields)? + 80 => { + self.style.push(is.read_enum_or_unknown()?); }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + 82 => { + ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.style)? + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } @@ -259,10 +180,10 @@ impl ::protobuf::Message for ResourceDescriptor { // Compute sizes of nested messages #[allow(unused_variables)] - fn compute_size(&self) -> u32 { + fn compute_size(&self) -> u64 { let mut my_size = 0; - if !self.field_type.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.field_type); + if !self.type_.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.type_); } for value in &self.pattern { my_size += ::protobuf::rt::string_size(2, &value); @@ -270,8 +191,8 @@ impl ::protobuf::Message for ResourceDescriptor { if !self.name_field.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.name_field); } - if self.history != ResourceDescriptor_History::HISTORY_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(4, self.history); + if self.history != ::protobuf::EnumOrUnknown::new(resource_descriptor::History::HISTORY_UNSPECIFIED) { + my_size += ::protobuf::rt::int32_size(4, self.history.value()); } if !self.plural.is_empty() { my_size += ::protobuf::rt::string_size(5, &self.plural); @@ -280,16 +201,16 @@ impl ::protobuf::Message for ResourceDescriptor { my_size += ::protobuf::rt::string_size(6, &self.singular); } for value in &self.style { - my_size += ::protobuf::rt::enum_size(10, *value); + my_size += ::protobuf::rt::int32_size(10, value.value()); }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.field_type.is_empty() { - os.write_string(1, &self.field_type)?; + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.type_.is_empty() { + os.write_string(1, &self.type_)?; } for v in &self.pattern { os.write_string(2, &v)?; @@ -297,8 +218,8 @@ impl ::protobuf::Message for ResourceDescriptor { if !self.name_field.is_empty() { os.write_string(3, &self.name_field)?; } - if self.history != ResourceDescriptor_History::HISTORY_UNSPECIFIED { - os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.history))?; + if self.history != ::protobuf::EnumOrUnknown::new(resource_descriptor::History::HISTORY_UNSPECIFIED) { + os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.history))?; } if !self.plural.is_empty() { os.write_string(5, &self.plural)?; @@ -307,231 +228,215 @@ impl ::protobuf::Message for ResourceDescriptor { os.write_string(6, &self.singular)?; } for v in &self.style { - os.write_enum(10, ::protobuf::ProtobufEnum::value(v))?; + os.write_enum(10, ::protobuf::EnumOrUnknown::value(v))?; }; - os.write_unknown_fields(self.get_unknown_fields())?; + os.write_unknown_fields(self.special_fields.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) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields } - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields } fn new() -> ResourceDescriptor { ResourceDescriptor::new() } - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &ResourceDescriptor| { &m.field_type }, - |m: &mut ResourceDescriptor| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "pattern", - |m: &ResourceDescriptor| { &m.pattern }, - |m: &mut ResourceDescriptor| { &mut m.pattern }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name_field", - |m: &ResourceDescriptor| { &m.name_field }, - |m: &mut ResourceDescriptor| { &mut m.name_field }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "history", - |m: &ResourceDescriptor| { &m.history }, - |m: &mut ResourceDescriptor| { &mut m.history }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "plural", - |m: &ResourceDescriptor| { &m.plural }, - |m: &mut ResourceDescriptor| { &mut m.plural }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "singular", - |m: &ResourceDescriptor| { &m.singular }, - |m: &mut ResourceDescriptor| { &mut m.singular }, - )); - fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "style", - |m: &ResourceDescriptor| { &m.style }, - |m: &mut ResourceDescriptor| { &mut m.style }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResourceDescriptor", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static ResourceDescriptor { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ResourceDescriptor::new) - } -} - -impl ::protobuf::Clear for ResourceDescriptor { fn clear(&mut self) { - self.field_type.clear(); + self.type_.clear(); self.pattern.clear(); self.name_field.clear(); - self.history = ResourceDescriptor_History::HISTORY_UNSPECIFIED; + self.history = ::protobuf::EnumOrUnknown::new(resource_descriptor::History::HISTORY_UNSPECIFIED); self.plural.clear(); self.singular.clear(); self.style.clear(); - self.unknown_fields.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static ResourceDescriptor { + static instance: ResourceDescriptor = ResourceDescriptor { + type_: ::std::string::String::new(), + pattern: ::std::vec::Vec::new(), + name_field: ::std::string::String::new(), + history: ::protobuf::EnumOrUnknown::from_i32(0), + plural: ::std::string::String::new(), + singular: ::std::string::String::new(), + style: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance } } -impl ::std::fmt::Debug for ResourceDescriptor { +impl ::protobuf::MessageFull for ResourceDescriptor { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("ResourceDescriptor").unwrap()).clone() + } +} + +impl ::std::fmt::Display for ResourceDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ResourceDescriptor { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum ResourceDescriptor_History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2, -} +/// Nested message and enums of message `ResourceDescriptor` +pub mod resource_descriptor { + /// A description of the historical or future-looking state of the + /// resource pattern. + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.ResourceDescriptor.History) + pub enum History { + // @@protoc_insertion_point(enum_value:google.api.ResourceDescriptor.History.HISTORY_UNSPECIFIED) + HISTORY_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.ResourceDescriptor.History.ORIGINALLY_SINGLE_PATTERN) + ORIGINALLY_SINGLE_PATTERN = 1, + // @@protoc_insertion_point(enum_value:google.api.ResourceDescriptor.History.FUTURE_MULTI_PATTERN) + FUTURE_MULTI_PATTERN = 2, + } + + impl ::protobuf::Enum for History { + const NAME: &'static str = "History"; + + fn value(&self) -> i32 { + *self as i32 + } -impl ::protobuf::ProtobufEnum for ResourceDescriptor_History { - fn value(&self) -> i32 { - *self as i32 - } + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(History::HISTORY_UNSPECIFIED), + 1 => ::std::option::Option::Some(History::ORIGINALLY_SINGLE_PATTERN), + 2 => ::std::option::Option::Some(History::FUTURE_MULTI_PATTERN), + _ => ::std::option::Option::None + } + } - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ResourceDescriptor_History::HISTORY_UNSPECIFIED), - 1 => ::std::option::Option::Some(ResourceDescriptor_History::ORIGINALLY_SINGLE_PATTERN), - 2 => ::std::option::Option::Some(ResourceDescriptor_History::FUTURE_MULTI_PATTERN), - _ => ::std::option::Option::None + fn from_str(str: &str) -> ::std::option::Option { + match str { + "HISTORY_UNSPECIFIED" => ::std::option::Option::Some(History::HISTORY_UNSPECIFIED), + "ORIGINALLY_SINGLE_PATTERN" => ::std::option::Option::Some(History::ORIGINALLY_SINGLE_PATTERN), + "FUTURE_MULTI_PATTERN" => ::std::option::Option::Some(History::FUTURE_MULTI_PATTERN), + _ => ::std::option::Option::None + } } - } - fn values() -> &'static [Self] { - static values: &'static [ResourceDescriptor_History] = &[ - ResourceDescriptor_History::HISTORY_UNSPECIFIED, - ResourceDescriptor_History::ORIGINALLY_SINGLE_PATTERN, - ResourceDescriptor_History::FUTURE_MULTI_PATTERN, + const VALUES: &'static [History] = &[ + History::HISTORY_UNSPECIFIED, + History::ORIGINALLY_SINGLE_PATTERN, + History::FUTURE_MULTI_PATTERN, ]; - values } - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ResourceDescriptor.History", file_descriptor_proto()) - }) + impl ::protobuf::EnumFull for History { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("ResourceDescriptor.History").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } } -} -impl ::std::marker::Copy for ResourceDescriptor_History { -} + impl ::std::default::Default for History { + fn default() -> Self { + History::HISTORY_UNSPECIFIED + } + } -impl ::std::default::Default for ResourceDescriptor_History { - fn default() -> Self { - ResourceDescriptor_History::HISTORY_UNSPECIFIED + impl History { + pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ResourceDescriptor.History") + } } -} -impl ::protobuf::reflect::ProtobufValue for ResourceDescriptor_History { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + /// A flag representing a specific style that a resource claims to conform to. + #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] + // @@protoc_insertion_point(enum:google.api.ResourceDescriptor.Style) + pub enum Style { + // @@protoc_insertion_point(enum_value:google.api.ResourceDescriptor.Style.STYLE_UNSPECIFIED) + STYLE_UNSPECIFIED = 0, + // @@protoc_insertion_point(enum_value:google.api.ResourceDescriptor.Style.DECLARATIVE_FRIENDLY) + DECLARATIVE_FRIENDLY = 1, } -} -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum ResourceDescriptor_Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1, -} + impl ::protobuf::Enum for Style { + const NAME: &'static str = "Style"; -impl ::protobuf::ProtobufEnum for ResourceDescriptor_Style { - fn value(&self) -> i32 { - *self as i32 - } + fn value(&self) -> i32 { + *self as i32 + } - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ResourceDescriptor_Style::STYLE_UNSPECIFIED), - 1 => ::std::option::Option::Some(ResourceDescriptor_Style::DECLARATIVE_FRIENDLY), - _ => ::std::option::Option::None + fn from_i32(value: i32) -> ::std::option::Option