Skip to content

Commit

Permalink
chore: update googleaips
Browse files Browse the repository at this point in the history
  • Loading branch information
liufuyang committed Dec 4, 2024
1 parent ca43076 commit 81e4ebe
Show file tree
Hide file tree
Showing 5 changed files with 1,046 additions and 51 deletions.
3 changes: 3 additions & 0 deletions bigtable_rs/src/google.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ pub mod cloud {

#[path = "google/google.rpc.rs"]
pub mod rpc;

#[path = "google/google.r#type.rs"]
pub mod r#type;
149 changes: 109 additions & 40 deletions bigtable_rs/src/google/google.api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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
Expand Down Expand Up @@ -64,9 +64,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.
Expand All @@ -92,11 +91,8 @@ 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.
Expand Down Expand Up @@ -128,10 +124,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
Expand All @@ -155,10 +149,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
Expand Down Expand Up @@ -188,13 +180,15 @@ 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`
///
/// ## Rules for HTTP mapping
/// * gRPC: `GetMessage(message_id: "123456")`
///
/// * 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:
Expand All @@ -213,7 +207,7 @@ pub struct Http {
/// request body, all
/// fields are passed via URL path and URL query parameters.
///
/// ### Path template syntax
/// Path template syntax
///
/// ```text
/// Template = "/" Segments \[ Verb \] ;
Expand Down Expand Up @@ -254,7 +248,7 @@ pub struct Http {
/// Document](<https://developers.google.com/discovery/v1/reference/apis>) 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
Expand All @@ -269,17 +263,16 @@ 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:
///
/// ```text
/// 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
Expand Down Expand Up @@ -483,6 +476,9 @@ pub struct CommonLanguageSettings {
/// The destination where API teams want this client library to be published.
#[prost(enumeration = "ClientLibraryDestination", repeated, tag = "2")]
pub destinations: ::prost::alloc::vec::Vec<i32>,
/// Configuration for which RPCs should be generated in the GAPIC client.
#[prost(message, optional, tag = "3")]
pub selective_gapic_generation: ::core::option::Option<SelectiveGapicGeneration>,
}
/// Details about how and where to publish client libraries.
#[serde_with::serde_as]
Expand Down Expand Up @@ -575,6 +571,10 @@ pub struct Publishing {
/// <https://cloud.google.com/pubsub/lite/docs/reference/rpc>
#[prost(string, tag = "110")]
pub proto_reference_documentation_uri: ::prost::alloc::string::String,
/// Optional link to REST reference documentation. Example:
/// <https://cloud.google.com/pubsub/lite/docs/reference/rest>
#[prost(string, tag = "111")]
pub rest_reference_documentation_uri: ::prost::alloc::string::String,
}
/// Settings for Java client libraries.
#[serde_with::serde_as]
Expand Down Expand Up @@ -647,6 +647,35 @@ pub struct PythonSettings {
/// Some settings.
#[prost(message, optional, tag = "1")]
pub common: ::core::option::Option<CommonLanguageSettings>,
/// Experimental features to be included during client library generation.
#[prost(message, optional, tag = "2")]
pub experimental_features: ::core::option::Option<
python_settings::ExperimentalFeatures,
>,
}
/// Nested message and enum types in `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.
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExperimentalFeatures {
/// 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.
#[prost(bool, tag = "1")]
pub rest_async_io_enabled: bool,
/// Enables generation of protobuf code using new types that are more
/// Pythonic which are included in `protobuf>=5.29.x`. This feature will be
/// enabled by default 1 month after launching the feature in preview
/// packages.
#[prost(bool, tag = "2")]
pub protobuf_pythonic_types_enabled: bool,
}
}
/// Settings for Node client libraries.
#[serde_with::serde_as]
Expand Down Expand Up @@ -734,6 +763,15 @@ 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:
///
/// ```text
/// 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
Expand All @@ -742,19 +780,33 @@ pub struct MethodSettings {
///
/// Example of a YAML configuration::
///
/// ```text
/// publishing:
/// method_settings:
/// - selector: google.cloud.speech.v2.Speech.BatchRecognize
/// long_running:
/// initial_poll_delay:
/// seconds: 60 # 1 minute
/// poll_delay_multiplier: 1.5
/// max_poll_delay:
/// seconds: 360 # 6 minutes
/// total_poll_timeout:
/// seconds: 54000 # 90 minutes
/// method_settings:
/// - selector: google.cloud.speech.v2.Speech.BatchRecognize
/// long_running:
/// initial_poll_delay: 60s # 1 minute
/// poll_delay_multiplier: 1.5
/// max_poll_delay: 360s # 6 minutes
/// total_poll_timeout: 54000s # 90 minutes
/// ```
#[prost(message, optional, tag = "2")]
pub long_running: ::core::option::Option<method_settings::LongRunning>,
/// List of top-level fields of the request message, that should be
/// automatically populated by the client libraries based on their
/// (google.api.field_info).format. Currently supported format: UUID4.
///
/// Example of a YAML configuration:
///
/// ```text
/// publishing:
/// method_settings:
/// - selector: google.example.v1.ExampleService.CreateExample
/// auto_populated_fields:
/// - request_id
/// ```
#[prost(string, repeated, tag = "3")]
pub auto_populated_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Nested message and enum types in `MethodSettings`.
pub mod method_settings {
Expand Down Expand Up @@ -787,6 +839,18 @@ pub mod method_settings {
pub total_poll_timeout: ::core::option::Option<::prost_wkt_types::Duration>,
}
}
/// This message is used to configure the generation of a subset of the RPCs in
/// a service for client libraries.
#[serde_with::serde_as]
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SelectiveGapicGeneration {
/// An allowlist of the fully qualified names of RPCs that should be included
/// on public client surfaces.
#[prost(string, repeated, tag = "1")]
pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The organization for which the client libraries are being published.
/// Affects the url where generated docs are published, etc.
#[serde_with::serde_as]
Expand Down Expand Up @@ -1097,8 +1161,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](<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
Expand Down
Loading

0 comments on commit 81e4ebe

Please sign in to comment.