From d50bdd871f710162eff971ef8c6681a93f3d9347 Mon Sep 17 00:00:00 2001 From: viambot Date: Thu, 18 Jul 2024 16:09:55 +0000 Subject: [PATCH] [WORKFLOW] Updating protos from viamrobotics/api, commit: 5ab504d73c86f9735b2008be23c351a0d9a9c7db --- src/gen/google.api.rs | 103 ++++++++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 40 deletions(-) diff --git a/src/gen/google.api.rs b/src/gen/google.api.rs index 200c2b4..0f0384b 100644 --- a/src/gen/google.api.rs +++ b/src/gen/google.api.rs @@ -19,7 +19,7 @@ pub struct Http { #[prost(bool, tag="2")] pub fully_decode_reserved_expansion: bool, } -/// # gRPC Transcoding +/// gRPC Transcoding /// /// gRPC Transcoding is a feature for mapping between a gRPC method and one or /// more HTTP REST endpoints. It allows developers to build a single API service @@ -60,9 +60,8 @@ pub struct Http { /// /// This enables an HTTP REST to gRPC mapping as below: /// -/// HTTP | gRPC -/// -----|----- -/// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +/// - HTTP: `GET /v1/messages/123456` +/// - gRPC: `GetMessage(name: "messages/123456")` /// /// Any fields in the request message which are not bound by the path template /// automatically become HTTP query parameters if there is no HTTP request body. @@ -86,11 +85,9 @@ pub struct Http { /// /// This enables a HTTP JSON to RPC mapping as below: /// -/// HTTP | gRPC -/// -----|----- -/// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -/// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -/// "foo"))` +/// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` +/// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub: +/// SubMessage(subfield: "foo"))` /// /// Note that fields which are mapped to URL query parameters must have a /// primitive type or a repeated primitive type or a non-repeated message type. @@ -120,10 +117,8 @@ pub struct Http { /// representation of the JSON in the request body is determined by /// protos JSON encoding: /// -/// HTTP | gRPC -/// -----|----- -/// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -/// "123456" message { text: "Hi!" })` +/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` +/// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })` /// /// The special name `*` can be used in the body mapping to define that /// every field not bound by the path template should be mapped to the @@ -146,10 +141,8 @@ pub struct Http { /// /// The following HTTP JSON to RPC mapping is enabled: /// -/// HTTP | gRPC -/// -----|----- -/// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -/// "123456" text: "Hi!")` +/// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` +/// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")` /// /// Note that when using `*` in the body mapping, it is not possible to /// have HTTP parameters, as all fields not bound by the path end in @@ -177,13 +170,13 @@ pub struct Http { /// /// This enables the following two alternative HTTP JSON to RPC mappings: /// -/// HTTP | gRPC -/// -----|----- -/// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -/// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -/// "123456")` +/// - HTTP: `GET /v1/messages/123456` +/// - gRPC: `GetMessage(message_id: "123456")` /// -/// ## Rules for HTTP mapping +/// - HTTP: `GET /v1/users/me/messages/123456` +/// - gRPC: `GetMessage(user_id: "me" message_id: "123456")` +/// +/// Rules for HTTP mapping /// /// 1. Leaf request fields (recursive expansion nested messages in the request /// message) are classified into three categories: @@ -202,7 +195,7 @@ pub struct Http { /// request body, all /// fields are passed via URL path and URL query parameters. /// -/// ### Path template syntax +/// Path template syntax /// /// Template = "/" Segments [ Verb ] ; /// Segments = Segment { "/" Segment } ; @@ -241,7 +234,7 @@ pub struct Http { /// Document]() as /// `{+var}`. /// -/// ## Using gRPC API Service Configuration +/// Using gRPC API Service Configuration /// /// gRPC API Service Configuration (service config) is a configuration language /// for configuring a gRPC service to become a user-facing product. The @@ -256,15 +249,14 @@ pub struct Http { /// specified in the service config will override any matching transcoding /// configuration in the proto. /// -/// Example: +/// The following example selects a gRPC method and applies an `HttpRule` to it: /// /// http: /// rules: -/// # Selects a gRPC method and applies HttpRule to it. /// - selector: example.v1.Messaging.GetMessage /// get: /v1/messages/{message_id}/{sub.subfield} /// -/// ## Special notes +/// Special notes /// /// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the /// proto to JSON conversion must follow the [proto3 @@ -679,6 +671,13 @@ pub struct GoSettings { pub struct MethodSettings { /// The fully qualified name of the method, for which the options below apply. /// This is used to find the method to apply the options. + /// + /// Example: + /// + /// publishing: + /// method_settings: + /// - selector: google.storage.control.v2.StorageControl.CreateFolder + /// # method settings for CreateFolder... #[prost(string, tag="1")] pub selector: ::prost::alloc::string::String, /// Describes settings to use for long-running operations when generating @@ -687,17 +686,14 @@ pub struct MethodSettings { /// /// Example of a YAML configuration:: /// - /// publishing: - /// method_settings: + /// publishing: + /// method_settings: /// - selector: google.cloud.speech.v2.Speech.BatchRecognize /// long_running: - /// initial_poll_delay: - /// seconds: 60 # 1 minute + /// initial_poll_delay: 60s # 1 minute /// poll_delay_multiplier: 1.5 - /// max_poll_delay: - /// seconds: 360 # 6 minutes - /// total_poll_timeout: - /// seconds: 54000 # 90 minutes + /// max_poll_delay: 360s # 6 minutes + /// total_poll_timeout: 54000s # 90 minutes #[prost(message, optional, tag="2")] pub long_running: ::core::option::Option, /// List of top-level fields of the request message, that should be @@ -706,8 +702,8 @@ pub struct MethodSettings { /// /// Example of a YAML configuration: /// - /// publishing: - /// method_settings: + /// publishing: + /// method_settings: /// - selector: google.example.v1.ExampleService.CreateExample /// auto_populated_fields: /// - request_id @@ -931,6 +927,12 @@ pub struct FieldInfo { /// applied to. #[prost(enumeration="field_info::Format", tag="1")] pub format: i32, + /// 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. + #[prost(message, repeated, tag="2")] + pub referenced_types: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `FieldInfo`. pub mod field_info { @@ -990,6 +992,22 @@ pub mod field_info { } } } +/// A reference to a message type, for use in \[FieldInfo][google.api.FieldInfo\]. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TypeReference { + /// 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\]() for more details. + #[prost(string, tag="1")] + pub type_name: ::prost::alloc::string::String, +} /// Message that represents an arbitrary HTTP body. It should only be used for /// payload formats that can't be represented as JSON, such as raw binary or /// an HTML page. @@ -1153,8 +1171,13 @@ pub struct ResourceDescriptor { pub history: i32, /// 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'. It is the same - /// concept of the `plural` field in k8s CRD spec + /// name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + /// to this is for Nested Collections that have stuttering names, as defined + /// in \[AIP-122\](), 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 /// /// /// Note: The plural form is required even for singleton resources. See