From 45c1f939a6730ed102af3d11f728b6346467188d Mon Sep 17 00:00:00 2001 From: Abdulla Abdurakhmanov Date: Fri, 16 Sep 2022 22:32:38 +0200 Subject: [PATCH] Updated protos --- gcloud-protos-generator/proto/googleapis | 2 +- gcloud-sdk/Cargo.toml | 4 +- .../genproto/google.bigtable.admin.v2.rs | 64 + .../google.cloud.aiplatform.v1beta1.rs | 100 + .../google.cloud.bigquery.analyticshub.v1.rs | 861 +++++ .../genproto/google.cloud.compute.v1.rs | 1241 ++++++- .../google.cloud.contentwarehouse.v1.rs | 3161 +++++++++++++++++ .../google.cloud.healthcare.logging.rs | 231 ++ .../genproto/google.cloud.ids.logging.v1.rs | 162 + .../google.cloud.securitycenter.v1.rs | 14 +- .../genproto/google.cloud.tpu.v2alpha1.rs | 10 + gcloud-sdk/genproto/google.cloud.vision.v1.rs | 3 +- .../genproto/google.cloud.vision.v1p1beta1.rs | 3 +- .../genproto/google.cloud.vision.v1p2beta1.rs | 3 +- .../genproto/google.cloud.vision.v1p3beta1.rs | 3 +- .../genproto/google.cloud.vision.v1p4beta1.rs | 3 +- gcloud-sdk/genproto/google.container.v1.rs | 60 +- .../genproto/google.container.v1beta1.rs | 62 +- .../google.devtools.remoteworkers.v1test2.rs | 7 +- gcloud-sdk/genproto/google.firestore.v1.rs | 282 +- gcloud-sdk/genproto/google.iam.admin.v1.rs | 264 +- .../google.maps.addressvalidation.v1.rs | 754 ++++ .../google.spanner.admin.instance.v1.rs | 580 ++- .../genproto/google.storagetransfer.v1.rs | 220 +- .../genproto/maps.fleetengine.delivery.v1.rs | 7 +- gcloud-sdk/src/api_client.rs | 2 + gcloud-sdk/src/google_apis.rs | 48 +- 27 files changed, 7954 insertions(+), 197 deletions(-) create mode 100644 gcloud-sdk/genproto/google.cloud.bigquery.analyticshub.v1.rs create mode 100644 gcloud-sdk/genproto/google.cloud.contentwarehouse.v1.rs create mode 100644 gcloud-sdk/genproto/google.cloud.healthcare.logging.rs create mode 100644 gcloud-sdk/genproto/google.cloud.ids.logging.v1.rs create mode 100644 gcloud-sdk/genproto/google.maps.addressvalidation.v1.rs diff --git a/gcloud-protos-generator/proto/googleapis b/gcloud-protos-generator/proto/googleapis index 89404eeb9..9a3dd7a18 160000 --- a/gcloud-protos-generator/proto/googleapis +++ b/gcloud-protos-generator/proto/googleapis @@ -1 +1 @@ -Subproject commit 89404eeb9836ae2c74a508447687d2316479e189 +Subproject commit 9a3dd7a18cf75b6fc9b1211616730b2ba2c60c96 diff --git a/gcloud-sdk/Cargo.toml b/gcloud-sdk/Cargo.toml index 2cb3c6aab..3566953b2 100644 --- a/gcloud-sdk/Cargo.toml +++ b/gcloud-sdk/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "gcloud-sdk" -version = "0.18.3" +version = "0.18.4" authors = ["mechiru ", "Abdulla Abdurakhmanov "] edition = "2021" license = "MIT OR Apache-2.0" -description = "This library provides generated from proto Google API, authentication support, caching client." +description = "This library provides generated from proto Google APIs and simple to use APIs client hiding complexity of GCP authentication and secure networking based on Tonic middleware." repository = "https://github.com/abdolence/gcloud-sdk-rs" documentation = "https://docs.rs/gcloud-sdk" categories = ["api-bindings"] diff --git a/gcloud-sdk/genproto/google.bigtable.admin.v2.rs b/gcloud-sdk/genproto/google.bigtable.admin.v2.rs index 86ed3e389..033684474 100644 --- a/gcloud-sdk/genproto/google.bigtable.admin.v2.rs +++ b/gcloud-sdk/genproto/google.bigtable.admin.v2.rs @@ -1423,6 +1423,14 @@ pub struct Table { /// field will be populated with information about the restore. #[prost(message, optional, tag="6")] pub restore_info: ::core::option::Option, + /// Set to true to make the table protected against data loss. i.e. deleting + /// the following resources through Admin APIs are prohibited: + /// - The table. + /// - The column families in the table. + /// - The instance containing the table. + /// Note one can still delete the data stored in the table through Data APIs. + #[prost(bool, tag="9")] + pub deletion_protection: bool, } /// Nested message and enum types in `Table`. pub mod table { @@ -2063,6 +2071,39 @@ pub struct GetTableRequest { #[prost(enumeration="table::View", tag="2")] pub view: i32, } +/// The request for +/// \[UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateTableRequest { + /// Required. The table to update. + /// The table's `name` field is used to identify the table to update. + #[prost(message, optional, tag="1")] + pub table: ::core::option::Option, + /// Required. The list of fields to update. + /// A mask specifying which fields (e.g. `deletion_protection`) in the `table` + /// field should be updated. This mask is relative to the `table` field, not to + /// the request message. The wildcard (*) path is currently not supported. + /// Currently UpdateTable is only supported for the following field: + /// * `deletion_protection` + /// If `column_families` is set in `update_mask`, it will return an + /// UNIMPLEMENTED error. + #[prost(message, optional, tag="2")] + pub update_mask: ::core::option::Option<::prost_types::FieldMask>, +} +/// Metadata type for the operation returned by +/// \[UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateTableMetadata { + /// The name of the table being updated. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// The time at which this operation started. + #[prost(message, optional, tag="2")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// If set, the time at which this operation finished or was canceled. + #[prost(message, optional, tag="3")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, +} /// Request message for /// \[google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable\] #[derive(Clone, PartialEq, ::prost::Message)] @@ -2655,6 +2696,29 @@ pub mod bigtable_table_admin_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Updates a specified table. + pub async fn update_table( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.bigtable.admin.v2.BigtableTableAdmin/UpdateTable", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Permanently deletes a specified table and all of its data. pub async fn delete_table( &mut self, diff --git a/gcloud-sdk/genproto/google.cloud.aiplatform.v1beta1.rs b/gcloud-sdk/genproto/google.cloud.aiplatform.v1beta1.rs index ccf32a9bb..d318544dc 100644 --- a/gcloud-sdk/genproto/google.cloud.aiplatform.v1beta1.rs +++ b/gcloud-sdk/genproto/google.cloud.aiplatform.v1beta1.rs @@ -7432,6 +7432,13 @@ pub struct BatchReadFeatureValuesOperationMetadata { #[prost(message, optional, tag="1")] pub generic_metadata: ::core::option::Option, } +/// Details of operations that delete Feature values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteFeatureValuesOperationMetadata { + /// Operation metadata for Featurestore delete Features values. + #[prost(message, optional, tag="1")] + pub generic_metadata: ::core::option::Option, +} /// Details of operations that perform create EntityType. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateEntityTypeOperationMetadata { @@ -7453,6 +7460,67 @@ pub struct BatchCreateFeaturesOperationMetadata { #[prost(message, optional, tag="1")] pub generic_metadata: ::core::option::Option, } +/// Request message for +/// \[FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteFeatureValuesRequest { + /// Required. The resource name of the EntityType grouping the Features for + /// which values are being deleted from. Format: + /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + #[prost(string, tag="1")] + pub entity_type: ::prost::alloc::string::String, + /// Defines options to select feature values to be deleted. + #[prost(oneof="delete_feature_values_request::DeleteOption", tags="2")] + pub delete_option: ::core::option::Option, +} +/// Nested message and enum types in `DeleteFeatureValuesRequest`. +pub mod delete_feature_values_request { + /// Message to select entity. + /// If an entity id is selected, all the feature values corresponding to the + /// entity id will be deleted, including the entityId. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct SelectEntity { + /// Required. Selectors choosing feature values of which entity id to be + /// deleted from the EntityType. + #[prost(message, optional, tag="1")] + pub entity_id_selector: ::core::option::Option, + } + /// Defines options to select feature values to be deleted. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum DeleteOption { + /// Select feature values to be deleted by specifying entities. + #[prost(message, tag="2")] + SelectEntity(SelectEntity), + } +} +/// Response message for +/// \[FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteFeatureValuesResponse { +} +/// Selector for entityId. Getting ids from the given source. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EntityIdSelector { + /// Source column that holds entity IDs. If not provided, entity IDs are + /// extracted from the column named `entity_id`. + #[prost(string, tag="5")] + pub entity_id_field: ::prost::alloc::string::String, + /// Details about the source data, including the location of the storage and + /// the format. + #[prost(oneof="entity_id_selector::EntityIdsSource", tags="3")] + pub entity_ids_source: ::core::option::Option, +} +/// Nested message and enum types in `EntityIdSelector`. +pub mod entity_id_selector { + /// Details about the source data, including the location of the storage and + /// the format. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum EntityIdsSource { + /// Source of Csv + #[prost(message, tag="3")] + CsvSource(super::CsvSource), + } +} /// Generated client implementations. pub mod featurestore_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] @@ -7962,6 +8030,38 @@ pub mod featurestore_service_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Delete Feature values from Featurestore. + /// + /// The progress of the deletion is tracked by the returned operation. The + /// deleted feature values are guaranteed to be invisible to subsequent read + /// operations after the operation is marked as successfully done. + /// + /// If a delete feature values operation fails, the feature values + /// returned from reads and exports may be inconsistent. If consistency is + /// required, the caller must retry the same delete request again and wait till + /// the new operation returned is marked as successfully done. + pub async fn delete_feature_values( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.aiplatform.v1beta1.FeaturestoreService/DeleteFeatureValues", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Searches Features matching a query in a given project. pub async fn search_features( &mut self, diff --git a/gcloud-sdk/genproto/google.cloud.bigquery.analyticshub.v1.rs b/gcloud-sdk/genproto/google.cloud.bigquery.analyticshub.v1.rs new file mode 100644 index 000000000..574cb3df8 --- /dev/null +++ b/gcloud-sdk/genproto/google.cloud.bigquery.analyticshub.v1.rs @@ -0,0 +1,861 @@ +/// A data exchange is a container that lets you share data. Along with the +/// descriptive information about the data exchange, it contains listings that +/// reference shared datasets. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataExchange { + /// Output only. The resource name of the data exchange. + /// e.g. `projects/myproject/locations/US/dataExchanges/123`. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Required. Human-readable display name of the data exchange. The display name must + /// contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + /// spaces ( ), ampersands (&) and must not start or end with spaces. + /// Default value is an empty string. + /// Max length: 63 bytes. + #[prost(string, tag="2")] + pub display_name: ::prost::alloc::string::String, + /// Optional. Description of the data exchange. The description must not contain Unicode + /// non-characters as well as C0 and C1 control codes except tabs (HT), + /// new lines (LF), carriage returns (CR), and page breaks (FF). + /// Default value is an empty string. + /// Max length: 2000 bytes. + #[prost(string, tag="3")] + pub description: ::prost::alloc::string::String, + /// Optional. Email or URL of the primary point of contact of the data exchange. + /// Max Length: 1000 bytes. + #[prost(string, tag="4")] + pub primary_contact: ::prost::alloc::string::String, + /// Optional. Documentation describing the data exchange. + #[prost(string, tag="5")] + pub documentation: ::prost::alloc::string::String, + /// Output only. Number of listings contained in the data exchange. + #[prost(int32, tag="6")] + pub listing_count: i32, + /// Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB + /// Expected image dimensions are 512x512 pixels, however the API only + /// performs validation on size of the encoded data. + /// Note: For byte fields, the content of the fields are base64-encoded (which + /// increases the size of the data by 33-36%) when using JSON on the wire. + #[prost(bytes="vec", tag="7")] + pub icon: ::prost::alloc::vec::Vec, +} +/// Contains details of the data provider. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataProvider { + /// Optional. Name of the data provider. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Optional. Email or URL of the data provider. + /// Max Length: 1000 bytes. + #[prost(string, tag="2")] + pub primary_contact: ::prost::alloc::string::String, +} +/// Contains details of the listing publisher. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Publisher { + /// Optional. Name of the listing publisher. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Optional. Email or URL of the listing publisher. + /// Max Length: 1000 bytes. + #[prost(string, tag="2")] + pub primary_contact: ::prost::alloc::string::String, +} +/// Contains the reference that identifies a destination bigquery dataset. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DestinationDatasetReference { + /// Required. A unique ID for this dataset, without the project name. The ID + /// must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + /// The maximum length is 1,024 characters. + #[prost(string, tag="1")] + pub dataset_id: ::prost::alloc::string::String, + /// Required. The ID of the project containing this dataset. + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, +} +/// Defines the destination bigquery dataset. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DestinationDataset { + /// Required. A reference that identifies the destination dataset. + #[prost(message, optional, tag="1")] + pub dataset_reference: ::core::option::Option, + /// Optional. A descriptive name for the dataset. + #[prost(message, optional, tag="2")] + pub friendly_name: ::core::option::Option<::prost::alloc::string::String>, + /// Optional. A user-friendly description of the dataset. + #[prost(message, optional, tag="3")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + /// Optional. The labels associated with this dataset. You can use these + /// to organize and group your datasets. + /// You can set this property when inserting or updating a dataset. + /// See + /// for more information. + #[prost(map="string, string", tag="4")] + pub labels: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Required. The geographic location where the dataset should reside. See + /// for supported + /// locations. + #[prost(string, tag="5")] + pub location: ::prost::alloc::string::String, +} +/// A listing is what gets published into a data exchange that a subscriber can +/// subscribe to. It contains a reference to the data source along with +/// descriptive information that will help subscribers find and subscribe the +/// data. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Listing { + /// Output only. The resource name of the listing. + /// e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Required. Human-readable display name of the listing. The display name must contain + /// only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces + /// ( ), ampersands (&) and can't start or end with spaces. + /// Default value is an empty string. + /// Max length: 63 bytes. + #[prost(string, tag="2")] + pub display_name: ::prost::alloc::string::String, + /// Optional. Short description of the listing. The description must not contain + /// Unicode non-characters and C0 and C1 control codes except tabs (HT), + /// new lines (LF), carriage returns (CR), and page breaks (FF). + /// Default value is an empty string. + /// Max length: 2000 bytes. + #[prost(string, tag="3")] + pub description: ::prost::alloc::string::String, + /// Optional. Email or URL of the primary point of contact of the listing. + /// Max Length: 1000 bytes. + #[prost(string, tag="4")] + pub primary_contact: ::prost::alloc::string::String, + /// Optional. Documentation describing the listing. + #[prost(string, tag="5")] + pub documentation: ::prost::alloc::string::String, + /// Output only. Current state of the listing. + #[prost(enumeration="listing::State", tag="7")] + pub state: i32, + /// Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + /// Expected image dimensions are 512x512 pixels, however the API only + /// performs validation on size of the encoded data. + /// Note: For byte fields, the contents of the field are base64-encoded (which + /// increases the size of the data by 33-36%) when using JSON on the wire. + #[prost(bytes="vec", tag="8")] + pub icon: ::prost::alloc::vec::Vec, + /// Optional. Details of the data provider who owns the source data. + #[prost(message, optional, tag="9")] + pub data_provider: ::core::option::Option, + /// Optional. Categories of the listing. Up to two categories are allowed. + #[prost(enumeration="listing::Category", repeated, packed="false", tag="10")] + pub categories: ::prost::alloc::vec::Vec, + /// Optional. Details of the publisher who owns the listing and who can share + /// the source data. + #[prost(message, optional, tag="11")] + pub publisher: ::core::option::Option, + /// Optional. Email or URL of the request access of the listing. + /// Subscribers can use this reference to request access. + /// Max Length: 1000 bytes. + #[prost(string, tag="12")] + pub request_access: ::prost::alloc::string::String, + /// Listing source. + #[prost(oneof="listing::Source", tags="6")] + pub source: ::core::option::Option, +} +/// Nested message and enum types in `Listing`. +pub mod listing { + /// A reference to a shared dataset. It is an existing BigQuery dataset with a + /// collection of objects such as tables and views that you want to share + /// with subscribers. + /// When subscriber's subscribe to a listing, Analytics Hub creates a linked + /// dataset in + /// the subscriber's project. A Linked dataset is an opaque, read-only BigQuery + /// dataset that serves as a _symbolic link_ to a shared dataset. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct BigQueryDatasetSource { + /// Resource name of the dataset source for this listing. + /// e.g. `projects/myproject/datasets/123` + #[prost(string, tag="1")] + pub dataset: ::prost::alloc::string::String, + } + /// State of the listing. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum State { + /// Default value. This value is unused. + Unspecified = 0, + /// Subscribable state. Users with dataexchange.listings.subscribe permission + /// can subscribe to this listing. + Active = 1, + } + impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::Unspecified => "STATE_UNSPECIFIED", + State::Active => "ACTIVE", + } + } + } + /// Listing categories. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Category { + Unspecified = 0, + Others = 1, + AdvertisingAndMarketing = 2, + Commerce = 3, + ClimateAndEnvironment = 4, + Demographics = 5, + Economics = 6, + Education = 7, + Energy = 8, + Financial = 9, + Gaming = 10, + Geospatial = 11, + HealthcareAndLifeScience = 12, + Media = 13, + PublicSector = 14, + Retail = 15, + Sports = 16, + ScienceAndResearch = 17, + TransportationAndLogistics = 18, + TravelAndTourism = 19, + } + impl Category { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Category::Unspecified => "CATEGORY_UNSPECIFIED", + Category::Others => "CATEGORY_OTHERS", + Category::AdvertisingAndMarketing => "CATEGORY_ADVERTISING_AND_MARKETING", + Category::Commerce => "CATEGORY_COMMERCE", + Category::ClimateAndEnvironment => "CATEGORY_CLIMATE_AND_ENVIRONMENT", + Category::Demographics => "CATEGORY_DEMOGRAPHICS", + Category::Economics => "CATEGORY_ECONOMICS", + Category::Education => "CATEGORY_EDUCATION", + Category::Energy => "CATEGORY_ENERGY", + Category::Financial => "CATEGORY_FINANCIAL", + Category::Gaming => "CATEGORY_GAMING", + Category::Geospatial => "CATEGORY_GEOSPATIAL", + Category::HealthcareAndLifeScience => "CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE", + Category::Media => "CATEGORY_MEDIA", + Category::PublicSector => "CATEGORY_PUBLIC_SECTOR", + Category::Retail => "CATEGORY_RETAIL", + Category::Sports => "CATEGORY_SPORTS", + Category::ScienceAndResearch => "CATEGORY_SCIENCE_AND_RESEARCH", + Category::TransportationAndLogistics => "CATEGORY_TRANSPORTATION_AND_LOGISTICS", + Category::TravelAndTourism => "CATEGORY_TRAVEL_AND_TOURISM", + } + } + } + /// Listing source. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Source { + /// Required. Shared dataset i.e. BigQuery dataset source. + #[prost(message, tag="6")] + BigqueryDataset(BigQueryDatasetSource), + } +} +/// Message for requesting the list of data exchanges. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDataExchangesRequest { + /// Required. The parent resource path of the data exchanges. + /// e.g. `projects/myproject/locations/US`. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of results to return in a single response page. Leverage + /// the page tokens to iterate through the entire collection. + #[prost(int32, tag="2")] + pub page_size: i32, + /// Page token, returned by a previous call, to request the next page of + /// results. + #[prost(string, tag="3")] + pub page_token: ::prost::alloc::string::String, +} +/// Message for response to the list of data exchanges. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDataExchangesResponse { + /// The list of data exchanges. + #[prost(message, repeated, tag="1")] + pub data_exchanges: ::prost::alloc::vec::Vec, + /// A token to request the next page of results. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Message for requesting the list of data exchanges from projects in an +/// organization and location. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgDataExchangesRequest { + /// Required. The organization resource path of the projects containing DataExchanges. + /// e.g. `organizations/myorg/locations/US`. + #[prost(string, tag="1")] + pub organization: ::prost::alloc::string::String, + /// The maximum number of results to return in a single response page. Leverage + /// the page tokens to iterate through the entire collection. + #[prost(int32, tag="2")] + pub page_size: i32, + /// Page token, returned by a previous call, to request the next page of + /// results. + #[prost(string, tag="3")] + pub page_token: ::prost::alloc::string::String, +} +/// Message for response to listing data exchanges in an organization and +/// location. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgDataExchangesResponse { + /// The list of data exchanges. + #[prost(message, repeated, tag="1")] + pub data_exchanges: ::prost::alloc::vec::Vec, + /// A token to request the next page of results. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Message for getting a data exchange. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDataExchangeRequest { + /// Required. The resource name of the data exchange. + /// e.g. `projects/myproject/locations/US/dataExchanges/123`. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Message for creating a data exchange. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateDataExchangeRequest { + /// Required. The parent resource path of the data exchange. + /// e.g. `projects/myproject/locations/US`. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// Required. The ID of the data exchange. + /// Must contain only Unicode letters, numbers (0-9), underscores (_). + /// Should not use characters that require URL-escaping, or characters + /// outside of ASCII, spaces. + /// Max length: 100 bytes. + #[prost(string, tag="2")] + pub data_exchange_id: ::prost::alloc::string::String, + /// Required. The data exchange to create. + #[prost(message, optional, tag="3")] + pub data_exchange: ::core::option::Option, +} +/// Message for updating a data exchange. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateDataExchangeRequest { + /// Required. Field mask specifies the fields to update in the data exchange + /// resource. The fields specified in the + /// `updateMask` are relative to the resource and are not a full request. + #[prost(message, optional, tag="1")] + pub update_mask: ::core::option::Option<::prost_types::FieldMask>, + /// Required. The data exchange to update. + #[prost(message, optional, tag="2")] + pub data_exchange: ::core::option::Option, +} +/// Message for deleting a data exchange. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteDataExchangeRequest { + /// Required. The full name of the data exchange resource that you want to delete. + /// For example, `projects/myproject/locations/US/dataExchanges/123`. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Message for requesting the list of listings. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListListingsRequest { + /// Required. The parent resource path of the listing. + /// e.g. `projects/myproject/locations/US/dataExchanges/123`. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of results to return in a single response page. Leverage + /// the page tokens to iterate through the entire collection. + #[prost(int32, tag="2")] + pub page_size: i32, + /// Page token, returned by a previous call, to request the next page of + /// results. + #[prost(string, tag="3")] + pub page_token: ::prost::alloc::string::String, +} +/// Message for response to the list of Listings. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListListingsResponse { + /// The list of Listing. + #[prost(message, repeated, tag="1")] + pub listings: ::prost::alloc::vec::Vec, + /// A token to request the next page of results. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Message for getting a listing. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetListingRequest { + /// Required. The resource name of the listing. + /// e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Message for creating a listing. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateListingRequest { + /// Required. The parent resource path of the listing. + /// e.g. `projects/myproject/locations/US/dataExchanges/123`. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// Required. The ID of the listing to create. + /// Must contain only Unicode letters, numbers (0-9), underscores (_). + /// Should not use characters that require URL-escaping, or characters + /// outside of ASCII, spaces. + /// Max length: 100 bytes. + #[prost(string, tag="2")] + pub listing_id: ::prost::alloc::string::String, + /// Required. The listing to create. + #[prost(message, optional, tag="3")] + pub listing: ::core::option::Option, +} +/// Message for updating a Listing. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateListingRequest { + /// Required. Field mask specifies the fields to update in the listing resource. The + /// fields specified in the `updateMask` are relative to the resource and are + /// not a full request. + #[prost(message, optional, tag="1")] + pub update_mask: ::core::option::Option<::prost_types::FieldMask>, + /// Required. The listing to update. + #[prost(message, optional, tag="2")] + pub listing: ::core::option::Option, +} +/// Message for deleting a listing. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteListingRequest { + /// Required. Resource name of the listing to delete. + /// e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Message for subscribing to a listing. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SubscribeListingRequest { + /// Required. Resource name of the listing that you want to subscribe to. + /// e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Resulting destination of the listing that you subscribed to. + #[prost(oneof="subscribe_listing_request::Destination", tags="3")] + pub destination: ::core::option::Option, +} +/// Nested message and enum types in `SubscribeListingRequest`. +pub mod subscribe_listing_request { + /// Resulting destination of the listing that you subscribed to. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Destination { + /// BigQuery destination dataset to create for the subscriber. + #[prost(message, tag="3")] + DestinationDataset(super::DestinationDataset), + } +} +/// Message for response when you subscribe to a listing. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SubscribeListingResponse { +} +/// Generated client implementations. +pub mod analytics_hub_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// The `AnalyticsHubService` API facilitates data sharing within and across + /// organizations. It allows data providers to publish listings that reference + /// shared datasets. With Analytics Hub, users can discover and search for + /// listings that they have access to. Subscribers can view and subscribe to + /// listings. When you subscribe to a listing, Analytics Hub creates a linked + /// dataset in your project. + #[derive(Debug, Clone)] + pub struct AnalyticsHubServiceClient { + inner: tonic::client::Grpc, + } + impl AnalyticsHubServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl AnalyticsHubServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> AnalyticsHubServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + AnalyticsHubServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Lists all data exchanges in a given project and location. + pub async fn list_data_exchanges( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListDataExchanges", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Lists all data exchanges from projects in a given organization and + /// location. + pub async fn list_org_data_exchanges( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListOrgDataExchanges", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Gets the details of a data exchange. + pub async fn get_data_exchange( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetDataExchange", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Creates a new data exchange. + pub async fn create_data_exchange( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/CreateDataExchange", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Updates an existing data exchange. + pub async fn update_data_exchange( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/UpdateDataExchange", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Deletes an existing data exchange. + pub async fn delete_data_exchange( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteDataExchange", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Lists all listings in a given project and location. + pub async fn list_listings( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/ListListings", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Gets the details of a listing. + pub async fn get_listing( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetListing", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Creates a new listing. + pub async fn create_listing( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/CreateListing", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Updates an existing listing. + pub async fn update_listing( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/UpdateListing", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Deletes a listing. + pub async fn delete_listing( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/DeleteListing", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Subscribes to a listing. + /// + /// Currently, with Analytics Hub, you can create listings that + /// reference only BigQuery datasets. + /// Upon subscription to a listing for a BigQuery dataset, Analytics Hub + /// creates a linked dataset in the subscriber's project. + pub async fn subscribe_listing( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/SubscribeListing", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Gets the IAM policy. + pub async fn get_iam_policy( + &mut self, + request: impl tonic::IntoRequest< + super::super::super::super::super::iam::v1::GetIamPolicyRequest, + >, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/GetIamPolicy", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Sets the IAM policy. + pub async fn set_iam_policy( + &mut self, + request: impl tonic::IntoRequest< + super::super::super::super::super::iam::v1::SetIamPolicyRequest, + >, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/SetIamPolicy", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Returns the permissions that a caller has. + pub async fn test_iam_permissions( + &mut self, + request: impl tonic::IntoRequest< + super::super::super::super::super::iam::v1::TestIamPermissionsRequest, + >, + ) -> Result< + tonic::Response< + super::super::super::super::super::iam::v1::TestIamPermissionsResponse, + >, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.bigquery.analyticshub.v1.AnalyticsHubService/TestIamPermissions", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} diff --git a/gcloud-sdk/genproto/google.cloud.compute.v1.rs b/gcloud-sdk/genproto/google.cloud.compute.v1.rs index 73dc57059..b788cd959 100644 --- a/gcloud-sdk/genproto/google.cloud.compute.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.compute.v1.rs @@ -610,7 +610,7 @@ pub struct Address { /// The prefix length if the resource represents an IP range. #[prost(int32, optional, tag="453565747")] pub prefix_length: ::core::option::Option, - /// The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *IPsec-encrypted Cloud Interconnect* configuration. These addresses are regional resources. Not currently available publicly. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose. + /// The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose. /// Check the Purpose enum for the list of possible values. #[prost(string, optional, tag="316407070")] pub purpose: ::core::option::Option<::prost::alloc::string::String>, @@ -713,7 +713,7 @@ pub mod address { } } } - /// The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *IPsec-encrypted Cloud Interconnect* configuration. These addresses are regional resources. Not currently available publicly. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose. + /// The purpose of this resource, which can be one of the following values: - GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources. - DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network) - VPC_PEERING for global internal IP addresses used for private services access allocated ranges. - NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using automatic NAT IP address allocation. - IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an *HA VPN over Cloud Interconnect* configuration. These addresses are regional resources. - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned to multiple internal forwarding rules. - `PRIVATE_SERVICE_CONNECT` for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Purpose { @@ -723,7 +723,7 @@ pub mod address { DnsResolver = 476114556, /// VM internal/alias IP, Internal LB service IP, etc. GceEndpoint = 230515243, - /// A regional internal IP address range reserved for the VLAN attachment that is used in IPsec-encrypted Cloud Interconnect. This regional internal IP address range must not overlap with any IP address range of subnet/route in the VPC network and its peering networks. After the VLAN attachment is created with the reserved IP address range, when creating a new VPN gateway, its interface IP address is allocated from the associated VLAN attachment���s IP address range. + /// A regional internal IP address range reserved for the VLAN attachment that is used in HA VPN over Cloud Interconnect. This regional internal IP address range must not overlap with any IP address range of subnet/route in the VPC network and its peering networks. After the VLAN attachment is created with the reserved IP address range, when creating a new VPN gateway, its interface IP address is allocated from the associated VLAN attachment���s IP address range. IpsecInterconnect = 340437251, /// External IP automatically reserved for Cloud NAT. NatAuto = 163666477, @@ -852,6 +852,9 @@ pub struct AdvancedMachineFeatures { /// The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed. #[prost(int32, optional, tag="352611671")] pub threads_per_core: ::core::option::Option, + /// The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance's nominal CPU count and the underlying platform's SMT width. + #[prost(int32, optional, tag="193198684")] + pub visible_core_count: ::core::option::Option, } /// A request message for AcceleratorTypes.AggregatedList. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] @@ -1553,6 +1556,31 @@ pub struct AggregatedListSslCertificatesRequest { #[prost(bool, optional, tag="517198390")] pub return_partial_success: ::core::option::Option, } +/// A request message for SslPolicies.AggregatedList. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AggregatedListSslPoliciesRequest { + /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + #[prost(string, optional, tag="336120696")] + pub filter: ::core::option::Option<::prost::alloc::string::String>, + /// Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + #[prost(bool, optional, tag="391327988")] + pub include_all_scopes: ::core::option::Option, + /// The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + #[prost(uint32, optional, tag="54715419")] + pub max_results: ::core::option::Option, + /// Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + #[prost(string, optional, tag="160562920")] + pub order_by: ::core::option::Option<::prost::alloc::string::String>, + /// Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + #[prost(string, optional, tag="19994697")] + pub page_token: ::core::option::Option<::prost::alloc::string::String>, + /// Name of the project scoping this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + #[prost(bool, optional, tag="517198390")] + pub return_partial_success: ::core::option::Option, +} /// A request message for Subnetworks.AggregatedList. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AggregatedListSubnetworksRequest { @@ -1980,6 +2008,9 @@ pub struct AttachedDisk { /// The size of the disk in GB. #[prost(int64, optional, tag="316263735")] pub disk_size_gb: ::core::option::Option, + /// [Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. + #[prost(bool, optional, tag="142758425")] + pub force_attach: ::core::option::Option, /// A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. #[prost(message, repeated, tag="79294545")] pub guest_os_features: ::prost::alloc::vec::Vec, @@ -1989,7 +2020,7 @@ pub struct AttachedDisk { /// [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both. #[prost(message, optional, tag="17697045")] pub initialize_params: ::core::option::Option, - /// Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. + /// Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks. /// Check the Interface enum for the list of possible values. #[prost(string, optional, tag="502623545")] pub interface: ::core::option::Option<::prost::alloc::string::String>, @@ -2043,7 +2074,7 @@ pub mod attached_disk { } } } - /// Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. + /// Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Interface { @@ -2144,6 +2175,9 @@ pub struct AttachedDiskInitializeParams { /// Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation. #[prost(int64, optional, tag="186769108")] pub provisioned_iops: ::core::option::Option, + /// Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values are in the format `tagValues/456`. The field is ignored (both PUT & PATCH) when empty. + #[prost(map="string, string", tag="377671164")] + pub resource_manager_tags: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, /// Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name. #[prost(string, repeated, tag="22220385")] pub resource_policies: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -2820,6 +2854,10 @@ pub struct BackendBucket { /// Cloud CDN configuration for this BackendBucket. #[prost(message, optional, tag="213976452")] pub cdn_policy: ::core::option::Option, + /// Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. + /// Check the CompressionMode enum for the list of possible values. + #[prost(string, optional, tag="95520988")] + pub compression_mode: ::core::option::Option<::prost::alloc::string::String>, /// [Output Only] Creation timestamp in RFC3339 text format. #[prost(string, optional, tag="30525366")] pub creation_timestamp: ::core::option::Option<::prost::alloc::string::String>, @@ -2848,6 +2886,33 @@ pub struct BackendBucket { #[prost(string, optional, tag="456214797")] pub self_link: ::core::option::Option<::prost::alloc::string::String>, } +/// Nested message and enum types in `BackendBucket`. +pub mod backend_bucket { + /// Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum CompressionMode { + /// A value indicating that the enum field is not set. + UndefinedCompressionMode = 0, + /// Automatically uses the best compression based on the Accept-Encoding header sent by the client. + Automatic = 165298699, + /// Disables compression. Existing compressed responses cached by Cloud CDN will not be served to clients. + Disabled = 516696700, + } + impl CompressionMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + CompressionMode::UndefinedCompressionMode => "UNDEFINED_COMPRESSION_MODE", + CompressionMode::Automatic => "AUTOMATIC", + CompressionMode::Disabled => "DISABLED", + } + } + } +} /// Message containing Cloud CDN configuration for a backend bucket. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BackendBucketCdnPolicy { @@ -2984,6 +3049,10 @@ pub struct BackendService { pub cdn_policy: ::core::option::Option, #[prost(message, optional, tag="421340061")] pub circuit_breakers: ::core::option::Option, + /// Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. + /// Check the CompressionMode enum for the list of possible values. + #[prost(string, optional, tag="95520988")] + pub compression_mode: ::core::option::Option<::prost::alloc::string::String>, #[prost(message, optional, tag="461096747")] pub connection_draining: ::core::option::Option, /// Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for Network Load Balancing and Internal TCP/UDP Load Balancing. @@ -3091,6 +3160,30 @@ pub struct BackendService { } /// Nested message and enum types in `BackendService`. pub mod backend_service { + /// Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum CompressionMode { + /// A value indicating that the enum field is not set. + UndefinedCompressionMode = 0, + /// Automatically uses the best compression based on the Accept-Encoding header sent by the client. + Automatic = 165298699, + /// Disables compression. Existing compressed responses cached by Cloud CDN will not be served to clients. + Disabled = 516696700, + } + impl CompressionMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + CompressionMode::UndefinedCompressionMode => "UNDEFINED_COMPRESSION_MODE", + CompressionMode::Automatic => "AUTOMATIC", + CompressionMode::Disabled => "DISABLED", + } + } + } /// Specifies the load balancer type. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] @@ -3565,10 +3658,10 @@ pub mod backend_service_locality_load_balancing_policy_config_policy { /// The available logging options for the load balancer traffic served by this backend service. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BackendServiceLogConfig { - /// This field denotes whether to enable logging for the load balancer traffic served by this backend service. + /// Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false. #[prost(bool, optional, tag="311764355")] pub enable: ::core::option::Option, - /// This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 0.0. + /// This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. #[prost(float, optional, tag="153193045")] pub sample_rate: ::core::option::Option, } @@ -3866,7 +3959,7 @@ pub struct Binding { /// The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](). #[prost(message, optional, tag="212430107")] pub condition: ::core::option::Option, - /// Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + /// Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog\[{namespace}/{kubernetes-sa}\]`: An identifier for a [Kubernetes service account](). For example, `my-project.svc.id.goog\[my-namespace/my-kubernetes-sa\]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. #[prost(string, repeated, tag="412010777")] pub members: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. @@ -4066,6 +4159,9 @@ pub struct Commitment { /// The license specification required as part of a license commitment. #[prost(message, optional, tag="437955148")] pub license_resource: ::core::option::Option, + /// List of source commitments to be merged into a new commitment. + #[prost(string, repeated, tag="188093761")] + pub merge_source_commitments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `\[a-z]([-a-z0-9]*[a-z0-9\])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. #[prost(string, optional, tag="3373707")] pub name: ::core::option::Option<::prost::alloc::string::String>, @@ -4085,6 +4181,9 @@ pub struct Commitment { /// [Output Only] Server-defined URL for the resource. #[prost(string, optional, tag="456214797")] pub self_link: ::core::option::Option<::prost::alloc::string::String>, + /// Source commitment to be splitted into a new commitment. + #[prost(string, optional, tag="402611156")] + pub split_source_commitment: ::core::option::Option<::prost::alloc::string::String>, /// [Output Only] Commitment start time in RFC3339 text format. #[prost(string, optional, tag="83645817")] pub start_timestamp: ::core::option::Option<::prost::alloc::string::String>, @@ -5383,6 +5482,22 @@ pub struct DeleteRegionSslCertificateRequest { #[prost(string, tag="46443492")] pub ssl_certificate: ::prost::alloc::string::String, } +/// A request message for RegionSslPolicies.Delete. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteRegionSslPolicyRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035. + #[prost(string, tag="295190213")] + pub ssl_policy: ::prost::alloc::string::String, +} /// A request message for RegionTargetHttpProxies.Delete. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRegionTargetHttpProxyRequest { @@ -5415,6 +5530,22 @@ pub struct DeleteRegionTargetHttpsProxyRequest { #[prost(string, tag="52336748")] pub target_https_proxy: ::prost::alloc::string::String, } +/// A request message for RegionTargetTcpProxies.Delete. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteRegionTargetTcpProxyRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// Name of the TargetTcpProxy resource to delete. + #[prost(string, tag="503065442")] + pub target_tcp_proxy: ::prost::alloc::string::String, +} /// A request message for RegionUrlMaps.Delete. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRegionUrlMapRequest { @@ -5987,6 +6118,9 @@ pub struct Disk { /// Internal use only. #[prost(string, optional, tag="361137822")] pub options: ::core::option::Option<::prost::alloc::string::String>, + /// Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. + #[prost(message, optional, tag="78313862")] + pub params: ::core::option::Option, /// Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. #[prost(int64, optional, tag="420007943")] pub physical_block_size_bytes: ::core::option::Option, @@ -6231,6 +6365,13 @@ pub struct DiskMoveRequest { #[prost(string, optional, tag="62433163")] pub target_disk: ::core::option::Option<::prost::alloc::string::String>, } +/// Additional disk params. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DiskParams { + /// Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values are in the format `tagValues/456`. The field is ignored (both PUT & PATCH) when empty. + #[prost(map="string, string", tag="377671164")] + pub resource_manager_tags: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, +} /// Represents a Disk Type resource. Google Compute Engine has two Disk Type resources: * \[Regional\](/compute/docs/reference/rest/v1/regionDiskTypes) * \[Zonal\](/compute/docs/reference/rest/v1/diskTypes) You can choose from a variety of disk types based on your needs. For more information, read Storage options. The diskTypes resource represents disk types for a zonal persistent disk. For more information, read Zonal persistent disks. The regionDiskTypes resource represents disk types for a regional persistent disk. For more information, read Regional persistent disks. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiskType { @@ -6752,7 +6893,7 @@ pub struct Firewall { /// If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. #[prost(string, repeated, tag="305699879")] pub destination_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields. + /// Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. /// Check the Direction enum for the list of possible values. #[prost(string, optional, tag="111150975")] pub direction: ::core::option::Option<::prost::alloc::string::String>, @@ -6798,7 +6939,7 @@ pub struct Firewall { } /// Nested message and enum types in `Firewall`. pub mod firewall { - /// Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields. + /// Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Direction { @@ -6903,7 +7044,7 @@ pub struct FirewallPolicy { /// An optional description of this resource. Provide this property when you create the resource. #[prost(string, optional, tag="422937596")] pub description: ::core::option::Option<::prost::alloc::string::String>, - /// Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `\[a-z]([-a-z0-9]*[a-z0-9\])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + /// Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `\[a-z]([-a-z0-9]*[a-z0-9\])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. #[prost(string, optional, tag="4473832")] pub display_name: ::core::option::Option<::prost::alloc::string::String>, /// Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. @@ -6915,10 +7056,10 @@ pub struct FirewallPolicy { /// [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies #[prost(string, optional, tag="3292052")] pub kind: ::core::option::Option<::prost::alloc::string::String>, - /// [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy. + /// Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by GCP which uniquely identifies the Organization Firewall Policy. #[prost(string, optional, tag="3373707")] pub name: ::core::option::Option<::prost::alloc::string::String>, - /// [Output Only] The parent of the firewall policy. + /// [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. #[prost(string, optional, tag="78317738")] pub parent: ::core::option::Option<::prost::alloc::string::String>, /// [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. @@ -6936,7 +7077,7 @@ pub struct FirewallPolicy { /// [Output Only] Server-defined URL for this resource with the resource id. #[prost(string, optional, tag="44520962")] pub self_link_with_id: ::core::option::Option<::prost::alloc::string::String>, - /// User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `\[a-z]([-a-z0-9]*[a-z0-9\])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + /// User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `\[a-z]([-a-z0-9]*[a-z0-9\])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. #[prost(string, optional, tag="492051566")] pub short_name: ::core::option::Option<::prost::alloc::string::String>, } @@ -7855,6 +7996,19 @@ pub struct GetHealthTargetPoolRequest { #[prost(string, tag="62796298")] pub target_pool: ::prost::alloc::string::String, } +/// A request message for BackendServices.GetIamPolicy. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIamPolicyBackendServiceRequest { + /// Requested IAM Policy version. + #[prost(int32, optional, tag="499220029")] + pub options_requested_policy_version: ::core::option::Option, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for Disks.GetIamPolicy. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetIamPolicyDiskRequest { @@ -7994,6 +8148,22 @@ pub struct GetIamPolicyNodeTemplateRequest { #[prost(string, tag="195806222")] pub resource: ::prost::alloc::string::String, } +/// A request message for RegionBackendServices.GetIamPolicy. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIamPolicyRegionBackendServiceRequest { + /// Requested IAM Policy version. + #[prost(int32, optional, tag="499220029")] + pub options_requested_policy_version: ::core::option::Option, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// The name of the region for this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for RegionDisks.GetIamPolicy. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetIamPolicyRegionDiskRequest { @@ -8612,6 +8782,19 @@ pub struct GetRegionSslCertificateRequest { #[prost(string, tag="46443492")] pub ssl_certificate: ::prost::alloc::string::String, } +/// A request message for RegionSslPolicies.Get. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRegionSslPolicyRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. + #[prost(string, tag="295190213")] + pub ssl_policy: ::prost::alloc::string::String, +} /// A request message for RegionTargetHttpProxies.Get. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionTargetHttpProxyRequest { @@ -8638,6 +8821,19 @@ pub struct GetRegionTargetHttpsProxyRequest { #[prost(string, tag="52336748")] pub target_https_proxy: ::prost::alloc::string::String, } +/// A request message for RegionTargetTcpProxies.Get. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRegionTargetTcpProxyRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// Name of the TargetTcpProxy resource to return. + #[prost(string, tag="503065442")] + pub target_tcp_proxy: ::prost::alloc::string::String, +} /// A request message for RegionUrlMaps.Get. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionUrlMapRequest { @@ -10080,7 +10276,7 @@ pub struct HttpRouteRule { /// For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. #[prost(int32, optional, tag="445151652")] pub priority: ::core::option::Option, - /// In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a route rule's routeAction. + /// In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. URL maps for Classic external HTTP(S) load balancers only support the urlRewrite action within a route rule's routeAction. #[prost(message, optional, tag="424563948")] pub route_action: ::core::option::Option, /// The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. @@ -11023,6 +11219,22 @@ pub struct InsertRegionSslCertificateRequest { #[prost(message, optional, tag="180709897")] pub ssl_certificate_resource: ::core::option::Option, } +/// A request message for RegionSslPolicies.Insert. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InsertRegionSslPolicyRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// The body resource for this request + #[prost(message, optional, tag="274891848")] + pub ssl_policy_resource: ::core::option::Option, +} /// A request message for RegionTargetHttpProxies.Insert. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct InsertRegionTargetHttpProxyRequest { @@ -11055,6 +11267,22 @@ pub struct InsertRegionTargetHttpsProxyRequest { #[prost(message, optional, tag="433657473")] pub target_https_proxy_resource: ::core::option::Option, } +/// A request message for RegionTargetTcpProxies.Insert. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InsertRegionTargetTcpProxyRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// The body resource for this request + #[prost(message, optional, tag="145913931")] + pub target_tcp_proxy_resource: ::core::option::Option, +} /// A request message for RegionUrlMaps.Insert. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct InsertRegionUrlMapRequest { @@ -11639,6 +11867,32 @@ pub struct InstanceAggregatedList { #[prost(message, optional, tag="50704284")] pub warning: ::core::option::Option, } +/// +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InstanceConsumptionData { + /// Resources consumed by the instance. + #[prost(message, optional, tag="146354898")] + pub consumption_info: ::core::option::Option, + /// Server-defined URL for the instance. + #[prost(string, optional, tag="18257045")] + pub instance: ::core::option::Option<::prost::alloc::string::String>, +} +/// +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InstanceConsumptionInfo { + /// The number of virtual CPUs that are available to the instance. + #[prost(int32, optional, tag="393356754")] + pub guest_cpus: ::core::option::Option, + /// The amount of local SSD storage available to the instance, defined in GiB. + #[prost(int32, optional, tag="329237578")] + pub local_ssd_gb: ::core::option::Option, + /// The amount of physical memory available to the instance, defined in MiB. + #[prost(int32, optional, tag="116001171")] + pub memory_mb: ::core::option::Option, + /// The minimal guaranteed number of virtual CPUs that are reserved. + #[prost(int32, optional, tag="317231675")] + pub min_node_cpus: ::core::option::Option, +} /// Represents an Instance Group resource. Instance Groups can be used to configure a target for load balancing. Instance groups can either be managed or unmanaged. To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead. Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups. For more information, read Instance groups. #[derive(Clone, PartialEq, ::prost::Message)] pub struct InstanceGroup { @@ -13144,7 +13398,7 @@ pub struct InterconnectAttachment { /// Check the EdgeAvailabilityDomain enum for the list of possible values. #[prost(string, optional, tag="71289510")] pub edge_availability_domain: ::core::option::Option<::prost::alloc::string::String>, - /// Indicates the user-supplied encryption option of this VLAN attachment (interconnectAttachment). Can only be specified at attachment creation for PARTNER or DEDICATED attachments. Possible values are: - NONE - This is the default value, which means that the VLAN attachment carries unencrypted traffic. VMs are able to send traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - The VLAN attachment carries only encrypted traffic that is encrypted by an IPsec device, such as an HA VPN gateway or third-party IPsec VPN. VMs cannot directly send traffic to, or receive traffic from, such a VLAN attachment. To use *IPsec-encrypted Cloud Interconnect*, the VLAN attachment must be created with this option. Not currently available publicly. + /// Indicates the user-supplied encryption option of this VLAN attachment (interconnectAttachment). Can only be specified at attachment creation for PARTNER or DEDICATED attachments. Possible values are: - NONE - This is the default value, which means that the VLAN attachment carries unencrypted traffic. VMs are able to send traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - The VLAN attachment carries only encrypted traffic that is encrypted by an IPsec device, such as an HA VPN gateway or third-party IPsec VPN. VMs cannot directly send traffic to, or receive traffic from, such a VLAN attachment. To use *HA VPN over Cloud Interconnect*, the VLAN attachment must be created with this option. /// Check the Encryption enum for the list of possible values. #[prost(string, optional, tag="97980291")] pub encryption: ::core::option::Option<::prost::alloc::string::String>, @@ -13293,13 +13547,13 @@ pub mod interconnect_attachment { } } } - /// Indicates the user-supplied encryption option of this VLAN attachment (interconnectAttachment). Can only be specified at attachment creation for PARTNER or DEDICATED attachments. Possible values are: - NONE - This is the default value, which means that the VLAN attachment carries unencrypted traffic. VMs are able to send traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - The VLAN attachment carries only encrypted traffic that is encrypted by an IPsec device, such as an HA VPN gateway or third-party IPsec VPN. VMs cannot directly send traffic to, or receive traffic from, such a VLAN attachment. To use *IPsec-encrypted Cloud Interconnect*, the VLAN attachment must be created with this option. Not currently available publicly. + /// Indicates the user-supplied encryption option of this VLAN attachment (interconnectAttachment). Can only be specified at attachment creation for PARTNER or DEDICATED attachments. Possible values are: - NONE - This is the default value, which means that the VLAN attachment carries unencrypted traffic. VMs are able to send traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - The VLAN attachment carries only encrypted traffic that is encrypted by an IPsec device, such as an HA VPN gateway or third-party IPsec VPN. VMs cannot directly send traffic to, or receive traffic from, such a VLAN attachment. To use *HA VPN over Cloud Interconnect*, the VLAN attachment must be created with this option. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Encryption { /// A value indicating that the enum field is not set. UndefinedEncryption = 0, - /// The interconnect attachment will carry only encrypted traffic that is encrypted by an IPsec device such as HA VPN gateway; VMs cannot directly send traffic to or receive traffic from such an interconnect attachment. To use IPsec-encrypted Cloud Interconnect, the interconnect attachment must be created with this option. + /// The interconnect attachment will carry only encrypted traffic that is encrypted by an IPsec device such as HA VPN gateway; VMs cannot directly send traffic to or receive traffic from such an interconnect attachment. To use HA VPN over Cloud Interconnect, the interconnect attachment must be created with this option. Ipsec = 69882282, /// This is the default value, which means the Interconnect Attachment will carry unencrypted traffic. VMs will be able to send traffic to or receive traffic from such interconnect attachment. None = 2402104, @@ -14250,6 +14504,31 @@ pub struct ListAutoscalersRequest { #[prost(string, tag="3744684")] pub zone: ::prost::alloc::string::String, } +/// A request message for RegionSslPolicies.ListAvailableFeatures. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAvailableFeaturesRegionSslPoliciesRequest { + /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + #[prost(string, optional, tag="336120696")] + pub filter: ::core::option::Option<::prost::alloc::string::String>, + /// The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + #[prost(uint32, optional, tag="54715419")] + pub max_results: ::core::option::Option, + /// Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + #[prost(string, optional, tag="160562920")] + pub order_by: ::core::option::Option<::prost::alloc::string::String>, + /// Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + #[prost(string, optional, tag="19994697")] + pub page_token: ::core::option::Option<::prost::alloc::string::String>, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + #[prost(bool, optional, tag="517198390")] + pub return_partial_success: ::core::option::Option, +} /// A request message for SslPolicies.ListAvailableFeatures. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAvailableFeaturesSslPoliciesRequest { @@ -15885,6 +16164,31 @@ pub struct ListRegionSslCertificatesRequest { #[prost(bool, optional, tag="517198390")] pub return_partial_success: ::core::option::Option, } +/// A request message for RegionSslPolicies.List. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRegionSslPoliciesRequest { + /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + #[prost(string, optional, tag="336120696")] + pub filter: ::core::option::Option<::prost::alloc::string::String>, + /// The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + #[prost(uint32, optional, tag="54715419")] + pub max_results: ::core::option::Option, + /// Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + #[prost(string, optional, tag="160562920")] + pub order_by: ::core::option::Option<::prost::alloc::string::String>, + /// Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + #[prost(string, optional, tag="19994697")] + pub page_token: ::core::option::Option<::prost::alloc::string::String>, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + #[prost(bool, optional, tag="517198390")] + pub return_partial_success: ::core::option::Option, +} /// A request message for RegionTargetHttpProxies.List. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListRegionTargetHttpProxiesRequest { @@ -15935,9 +16239,9 @@ pub struct ListRegionTargetHttpsProxiesRequest { #[prost(bool, optional, tag="517198390")] pub return_partial_success: ::core::option::Option, } -/// A request message for RegionUrlMaps.List. See the method description for details. +/// A request message for RegionTargetTcpProxies.List. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRegionUrlMapsRequest { +pub struct ListRegionTargetTcpProxiesRequest { /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. #[prost(string, optional, tag="336120696")] pub filter: ::core::option::Option<::prost::alloc::string::String>, @@ -15960,9 +16264,9 @@ pub struct ListRegionUrlMapsRequest { #[prost(bool, optional, tag="517198390")] pub return_partial_success: ::core::option::Option, } -/// A request message for Regions.List. See the method description for details. +/// A request message for RegionUrlMaps.List. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRegionsRequest { +pub struct ListRegionUrlMapsRequest { /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. #[prost(string, optional, tag="336120696")] pub filter: ::core::option::Option<::prost::alloc::string::String>, @@ -15978,13 +16282,16 @@ pub struct ListRegionsRequest { /// Project ID for this request. #[prost(string, tag="227560217")] pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, /// Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. #[prost(bool, optional, tag="517198390")] pub return_partial_success: ::core::option::Option, } -/// A request message for Reservations.List. See the method description for details. +/// A request message for Regions.List. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListReservationsRequest { +pub struct ListRegionsRequest { /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. #[prost(string, optional, tag="336120696")] pub filter: ::core::option::Option<::prost::alloc::string::String>, @@ -16003,13 +16310,10 @@ pub struct ListReservationsRequest { /// Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. #[prost(bool, optional, tag="517198390")] pub return_partial_success: ::core::option::Option, - /// Name of the zone for this request. - #[prost(string, tag="3744684")] - pub zone: ::prost::alloc::string::String, } -/// A request message for ResourcePolicies.List. See the method description for details. +/// A request message for Reservations.List. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListResourcePoliciesRequest { +pub struct ListReservationsRequest { /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. #[prost(string, optional, tag="336120696")] pub filter: ::core::option::Option<::prost::alloc::string::String>, @@ -16025,16 +16329,41 @@ pub struct ListResourcePoliciesRequest { /// Project ID for this request. #[prost(string, tag="227560217")] pub project: ::prost::alloc::string::String, - /// Name of the region for this request. - #[prost(string, tag="138946292")] - pub region: ::prost::alloc::string::String, /// Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. #[prost(bool, optional, tag="517198390")] pub return_partial_success: ::core::option::Option, + /// Name of the zone for this request. + #[prost(string, tag="3744684")] + pub zone: ::prost::alloc::string::String, } -/// A request message for Routers.List. See the method description for details. +/// A request message for ResourcePolicies.List. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListRoutersRequest { +pub struct ListResourcePoliciesRequest { + /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. + #[prost(string, optional, tag="336120696")] + pub filter: ::core::option::Option<::prost::alloc::string::String>, + /// The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + #[prost(uint32, optional, tag="54715419")] + pub max_results: ::core::option::Option, + /// Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + #[prost(string, optional, tag="160562920")] + pub order_by: ::core::option::Option<::prost::alloc::string::String>, + /// Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + #[prost(string, optional, tag="19994697")] + pub page_token: ::core::option::Option<::prost::alloc::string::String>, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region for this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + #[prost(bool, optional, tag="517198390")] + pub return_partial_success: ::core::option::Option, +} +/// A request message for Routers.List. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRoutersRequest { /// A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. #[prost(string, optional, tag="336120696")] pub filter: ::core::option::Option<::prost::alloc::string::String>, @@ -16584,7 +16913,7 @@ pub struct LocalDisk { /// Provides a localized error message that is safe to return to the user which can be attached to an RPC error. #[derive(Clone, PartialEq, ::prost::Message)] pub struct LocalizedMessage { - /// The locale used following the specification defined at Examples are: "en-US", "fr-CH", "es-MX" + /// The locale used following the specification defined at Examples are: "en-US", "fr-CH", "es-MX" #[prost(string, optional, tag="513150554")] pub locale: ::core::option::Option<::prost::alloc::string::String>, /// The localized error message in the above locale. @@ -17359,7 +17688,7 @@ pub struct Network { /// [Output Only] Type of the resource. Always compute#network for networks. #[prost(string, optional, tag="3292052")] pub kind: ::core::option::Option<::prost::alloc::string::String>, - /// Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1500 bytes. If unspecified, defaults to 1460. + /// Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460. #[prost(int32, optional, tag="108462")] pub mtu: ::core::option::Option, /// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `\[a-z]([-a-z0-9]*[a-z0-9\])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. @@ -18211,6 +18540,9 @@ pub struct NodeGroup { /// [Output Only] Server-defined URL for the resource. #[prost(string, optional, tag="456214797")] pub self_link: ::core::option::Option<::prost::alloc::string::String>, + /// Share-settings for the node group + #[prost(message, optional, tag="266668163")] + pub share_settings: ::core::option::Option, /// [Output Only] The total number of nodes in the node group. #[prost(int32, optional, tag="3530753")] pub size: ::core::option::Option, @@ -18389,6 +18721,9 @@ pub struct NodeGroupNode { /// Accelerators for this node. #[prost(message, repeated, tag="269577064")] pub accelerators: ::prost::alloc::vec::Vec, + /// Node resources that are reserved by all instances. + #[prost(message, optional, tag="334527118")] + pub consumed_resources: ::core::option::Option, /// CPU overcommit. /// Check the CpuOvercommitType enum for the list of possible values. #[prost(string, optional, tag="247727959")] @@ -18396,6 +18731,9 @@ pub struct NodeGroupNode { /// Local disk configurations. #[prost(message, repeated, tag="95594102")] pub disks: ::prost::alloc::vec::Vec, + /// Instance data that shows consumed resources on the node. + #[prost(message, repeated, tag="84715576")] + pub instance_consumption_data: ::prost::alloc::vec::Vec, /// Instances scheduled on this node. #[prost(string, repeated, tag="29097598")] pub instances: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -18418,6 +18756,9 @@ pub struct NodeGroupNode { /// Check the Status enum for the list of possible values. #[prost(string, optional, tag="181260274")] pub status: ::core::option::Option<::prost::alloc::string::String>, + /// Total amount of available resources on the node. + #[prost(message, optional, tag="97406698")] + pub total_resources: ::core::option::Option, } /// Nested message and enum types in `NodeGroupNode`. pub mod node_group_node { @@ -19889,6 +20230,25 @@ pub struct PatchRegionSecurityPolicyRequest { #[prost(message, optional, tag="216159612")] pub security_policy_resource: ::core::option::Option, } +/// A request message for RegionSslPolicies.Patch. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchRegionSslPolicyRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name of the region scoping this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// Name of the SSL policy to update. The name must be 1-63 characters long, and comply with RFC1035. + #[prost(string, tag="295190213")] + pub ssl_policy: ::prost::alloc::string::String, + /// The body resource for this request + #[prost(message, optional, tag="274891848")] + pub ssl_policy_resource: ::core::option::Option, +} /// A request message for RegionTargetHttpsProxies.Patch. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PatchRegionTargetHttpsProxyRequest { @@ -20162,7 +20522,7 @@ pub struct PatchUrlMapRequest { /// A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service is used. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PathMatcher { - /// defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a path matcher's defaultRouteAction. + /// defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for Classic external HTTP(S) load balancers only support the urlRewrite action within a path matcher's defaultRouteAction. #[prost(message, optional, tag="378919466")] pub default_route_action: ::core::option::Option, /// The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use @@ -20193,7 +20553,7 @@ pub struct PathRule { /// The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. #[prost(string, repeated, tag="106438894")] pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. URL maps for external HTTP(S) load balancers support only the urlRewrite action within a path rule's routeAction. + /// In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. URL maps for Classic external HTTP(S) load balancers only support the urlRewrite action within a path rule's routeAction. #[prost(message, optional, tag="424563948")] pub route_action: ::core::option::Option, /// The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. @@ -22979,7 +23339,7 @@ pub struct Router { /// An optional description of this resource. Provide this property when you create the resource. #[prost(string, optional, tag="422937596")] pub description: ::core::option::Option<::prost::alloc::string::String>, - /// Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments). Not currently available publicly. + /// Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments). #[prost(bool, optional, tag="297996575")] pub encrypted_interconnect_router: ::core::option::Option, /// [Output Only] The unique identifier for the resource. This identifier is defined by the server. @@ -24532,6 +24892,9 @@ pub mod security_policy_adaptive_protection_config_layer7_ddos_defense_config { /// #[derive(Clone, PartialEq, ::prost::Message)] pub struct SecurityPolicyAdvancedOptionsConfig { + /// Custom configuration to apply the JSON parsing. Only applicable when json_parsing is set to STANDARD. + #[prost(message, optional, tag="111570105")] + pub json_custom_config: ::core::option::Option, /// /// Check the JsonParsing enum for the list of possible values. #[prost(string, optional, tag="282493529")] @@ -24590,6 +24953,13 @@ pub mod security_policy_advanced_options_config { } /// #[derive(Clone, PartialEq, ::prost::Message)] +pub struct SecurityPolicyAdvancedOptionsConfigJsonCustomConfig { + /// A list of custom Content-Type header values to apply the JSON parsing. As per RFC 1341, a Content-Type header value has the following format: Content-Type := type "/" subtype *[";" parameter] When configuring a custom Content-Type header value, only the type/subtype needs to be specified, and the parameters should be excluded. + #[prost(string, repeated, tag="17428787")] + pub content_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SecurityPolicyDdosProtectionConfig { /// /// Check the DdosProtection enum for the list of possible values. @@ -25335,6 +25705,19 @@ pub struct SetEdgeSecurityPolicyBackendServiceRequest { #[prost(message, optional, tag="204135024")] pub security_policy_reference_resource: ::core::option::Option, } +/// A request message for BackendServices.SetIamPolicy. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetIamPolicyBackendServiceRequest { + /// The body resource for this request + #[prost(message, optional, tag="337048498")] + pub global_set_policy_request_resource: ::core::option::Option, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for Disks.SetIamPolicy. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetIamPolicyDiskRequest { @@ -25474,6 +25857,22 @@ pub struct SetIamPolicyNodeTemplateRequest { #[prost(string, tag="195806222")] pub resource: ::prost::alloc::string::String, } +/// A request message for RegionBackendServices.SetIamPolicy. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetIamPolicyRegionBackendServiceRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// The name of the region for this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// The body resource for this request + #[prost(message, optional, tag="276489091")] + pub region_set_policy_request_resource: ::core::option::Option, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for RegionDisks.SetIamPolicy. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetIamPolicyRegionDiskRequest { @@ -25621,6 +26020,25 @@ pub struct SetInstanceTemplateRegionInstanceGroupManagerRequest { #[prost(string, optional, tag="37109963")] pub request_id: ::core::option::Option<::prost::alloc::string::String>, } +/// A request message for Addresses.SetLabels. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLabelsAddressRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// The region for this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// The body resource for this request + #[prost(message, optional, tag="259357782")] + pub region_set_labels_request_resource: ::core::option::Option, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for Disks.SetLabels. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetLabelsDiskRequest { @@ -25672,6 +26090,19 @@ pub struct SetLabelsForwardingRuleRequest { #[prost(string, tag="195806222")] pub resource: ::prost::alloc::string::String, } +/// A request message for GlobalAddresses.SetLabels. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLabelsGlobalAddressRequest { + /// The body resource for this request + #[prost(message, optional, tag="319917189")] + pub global_set_labels_request_resource: ::core::option::Option, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for GlobalForwardingRules.SetLabels. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetLabelsGlobalForwardingRuleRequest { @@ -25717,6 +26148,38 @@ pub struct SetLabelsInstanceRequest { #[prost(string, tag="3744684")] pub zone: ::prost::alloc::string::String, } +/// A request message for InterconnectAttachments.SetLabels. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLabelsInterconnectAttachmentRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// The region for this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// The body resource for this request + #[prost(message, optional, tag="259357782")] + pub region_set_labels_request_resource: ::core::option::Option, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} +/// A request message for Interconnects.SetLabels. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLabelsInterconnectRequest { + /// The body resource for this request + #[prost(message, optional, tag="319917189")] + pub global_set_labels_request_resource: ::core::option::Option, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for RegionDisks.SetLabels. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetLabelsRegionDiskRequest { @@ -25736,6 +26199,19 @@ pub struct SetLabelsRegionDiskRequest { #[prost(string, tag="195806222")] pub resource: ::prost::alloc::string::String, } +/// A request message for SecurityPolicies.SetLabels. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLabelsSecurityPolicyRequest { + /// The body resource for this request + #[prost(message, optional, tag="319917189")] + pub global_set_labels_request_resource: ::core::option::Option, + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for Snapshots.SetLabels. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetLabelsSnapshotRequest { @@ -25749,6 +26225,25 @@ pub struct SetLabelsSnapshotRequest { #[prost(string, tag="195806222")] pub resource: ::prost::alloc::string::String, } +/// A request message for TargetVpnGateways.SetLabels. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLabelsTargetVpnGatewayRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// The region for this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// The body resource for this request + #[prost(message, optional, tag="259357782")] + pub region_set_labels_request_resource: ::core::option::Option, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for VpnGateways.SetLabels. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetLabelsVpnGatewayRequest { @@ -25768,6 +26263,25 @@ pub struct SetLabelsVpnGatewayRequest { #[prost(string, tag="195806222")] pub resource: ::prost::alloc::string::String, } +/// A request message for VpnTunnels.SetLabels. See the method description for details. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLabelsVpnTunnelRequest { + /// Project ID for this request. + #[prost(string, tag="227560217")] + pub project: ::prost::alloc::string::String, + /// The region for this request. + #[prost(string, tag="138946292")] + pub region: ::prost::alloc::string::String, + /// The body resource for this request + #[prost(message, optional, tag="259357782")] + pub region_set_labels_request_resource: ::core::option::Option, + /// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + #[prost(string, optional, tag="37109963")] + pub request_id: ::core::option::Option<::prost::alloc::string::String>, + /// Name or id of the resource for this request. + #[prost(string, tag="195806222")] + pub resource: ::prost::alloc::string::String, +} /// A request message for Instances.SetMachineResources. See the method description for details. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetMachineResourcesInstanceRequest { @@ -26320,6 +26834,8 @@ pub mod share_settings { UndefinedShareType = 0, /// Default value. Local = 72607563, + /// Shared-reservation is open to entire Organization + Organization = 274978099, /// Default value. This value is unused. Unspecified = 494771730, /// Shared-reservation is open to specific projects @@ -26334,6 +26850,7 @@ pub mod share_settings { match self { ShareType::UndefinedShareType => "UNDEFINED_SHARE_TYPE", ShareType::Local => "LOCAL", + ShareType::Organization => "ORGANIZATION", ShareType::Unspecified => "SHARE_TYPE_UNSPECIFIED", ShareType::SpecificProjects => "SPECIFIC_PROJECTS", } @@ -26928,6 +27445,33 @@ pub struct SslCertificatesScopedList { } /// #[derive(Clone, PartialEq, ::prost::Message)] +pub struct SslPoliciesAggregatedList { + #[prost(string, optional, tag="3123477")] + pub etag: ::core::option::Option<::prost::alloc::string::String>, + /// [Output Only] Unique identifier for the resource; defined by the server. + #[prost(string, optional, tag="3355")] + pub id: ::core::option::Option<::prost::alloc::string::String>, + /// A list of SslPoliciesScopedList resources. + #[prost(map="string, message", tag="100526016")] + pub items: ::std::collections::HashMap<::prost::alloc::string::String, SslPoliciesScopedList>, + /// [Output Only] Type of resource. Always compute#sslPolicyAggregatedList for lists of SSL Policies. + #[prost(string, optional, tag="3292052")] + pub kind: ::core::option::Option<::prost::alloc::string::String>, + /// [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + #[prost(string, optional, tag="79797525")] + pub next_page_token: ::core::option::Option<::prost::alloc::string::String>, + /// [Output Only] Server-defined URL for this resource. + #[prost(string, optional, tag="456214797")] + pub self_link: ::core::option::Option<::prost::alloc::string::String>, + /// [Output Only] Unreachable resources. + #[prost(string, repeated, tag="243372063")] + pub unreachables: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// [Output Only] Informational warning message. + #[prost(message, optional, tag="50704284")] + pub warning: ::core::option::Option, +} +/// +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SslPoliciesList { /// [Output Only] Unique identifier for the resource; defined by the server. #[prost(string, optional, tag="3355")] @@ -26954,6 +27498,16 @@ pub struct SslPoliciesListAvailableFeaturesResponse { #[prost(string, repeated, tag="246211645")] pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +/// +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SslPoliciesScopedList { + /// A list of SslPolicies contained in this scope. + #[prost(message, repeated, tag="209941027")] + pub ssl_policies: ::prost::alloc::vec::Vec, + /// Informational warning which replaces the list of SSL policies when the list is empty. + #[prost(message, optional, tag="50704284")] + pub warning: ::core::option::Option, +} /// Represents an SSL Policy resource. Use SSL policies to control the SSL features, such as versions and cipher suites, offered by an HTTPS or SSL Proxy load balancer. For more information, read SSL Policy Concepts. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SslPolicy { @@ -26989,6 +27543,9 @@ pub struct SslPolicy { /// Check the Profile enum for the list of possible values. #[prost(string, optional, tag="227445161")] pub profile: ::core::option::Option<::prost::alloc::string::String>, + /// [Output Only] URL of the region where the regional SSL policy resides. This field is not applicable to global SSL policies. + #[prost(string, optional, tag="138946292")] + pub region: ::core::option::Option<::prost::alloc::string::String>, /// [Output Only] Server-defined URL for the resource. #[prost(string, optional, tag="456214797")] pub self_link: ::core::option::Option<::prost::alloc::string::String>, @@ -28558,6 +29115,9 @@ pub struct TargetTcpProxy { /// Check the ProxyHeader enum for the list of possible values. #[prost(string, optional, tag="160374142")] pub proxy_header: ::core::option::Option<::prost::alloc::string::String>, + /// [Output Only] URL of the region where the regional TCP proxy resides. This field is not applicable to global TCP proxy. + #[prost(string, optional, tag="138946292")] + pub region: ::core::option::Option<::prost::alloc::string::String>, /// [Output Only] Server-defined URL for the resource. #[prost(string, optional, tag="456214797")] pub self_link: ::core::option::Option<::prost::alloc::string::String>, @@ -29571,7 +30131,7 @@ pub struct UrlMap { /// [Output Only] Creation timestamp in RFC3339 text format. #[prost(string, optional, tag="30525366")] pub creation_timestamp: ::core::option::Option<::prost::alloc::string::String>, - /// defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. + /// defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for Classic external HTTP(S) load balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. #[prost(message, optional, tag="378919466")] pub default_route_action: ::core::option::Option, /// The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. @@ -30291,10 +30851,10 @@ pub struct VpnGatewayVpnGatewayInterface { /// [Output Only] Numeric identifier for this VPN interface associated with the VPN gateway. #[prost(uint32, optional, tag="3355")] pub id: ::core::option::Option, - /// URL of the VLAN attachment (interconnectAttachment) resource for this VPN gateway interface. When the value of this field is present, the VPN gateway is used for IPsec-encrypted Cloud Interconnect; all egress or ingress traffic for this VPN gateway interface goes through the specified VLAN attachment resource. Not currently available publicly. + /// URL of the VLAN attachment (interconnectAttachment) resource for this VPN gateway interface. When the value of this field is present, the VPN gateway is used for HA VPN over Cloud Interconnect; all egress or ingress traffic for this VPN gateway interface goes through the specified VLAN attachment resource. #[prost(string, optional, tag="308135284")] pub interconnect_attachment: ::core::option::Option<::prost::alloc::string::String>, - /// [Output Only] IP address for this VPN interface associated with the VPN gateway. The IP address could be either a regional external IP address or a regional internal IP address. The two IP addresses for a VPN gateway must be all regional external or regional internal IP addresses. There cannot be a mix of regional external IP addresses and regional internal IP addresses. For IPsec-encrypted Cloud Interconnect, the IP addresses for both interfaces could either be regional internal IP addresses or regional external IP addresses. For regular (non IPsec-encrypted Cloud Interconnect) HA VPN tunnels, the IP address must be a regional external IP address. + /// [Output Only] IP address for this VPN interface associated with the VPN gateway. The IP address could be either a regional external IP address or a regional internal IP address. The two IP addresses for a VPN gateway must be all regional external or regional internal IP addresses. There cannot be a mix of regional external IP addresses and regional internal IP addresses. For HA VPN over Cloud Interconnect, the IP addresses for both interfaces could either be regional internal IP addresses or regional external IP addresses. For regular (non HA VPN over Cloud Interconnect) HA VPN tunnels, the IP address must be a regional external IP address. #[prost(string, optional, tag="406272220")] pub ip_address: ::core::option::Option<::prost::alloc::string::String>, } @@ -31279,6 +31839,26 @@ pub mod addresses_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation. + pub async fn set_labels( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.Addresses/SetLabels", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } /// Generated client implementations. @@ -31944,6 +32524,26 @@ pub mod backend_services_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Gets the access control policy for a resource. May be empty if no such policy or resource exists. + pub async fn get_iam_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.BackendServices/GetIamPolicy", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview . pub async fn insert( &mut self, @@ -32026,6 +32626,26 @@ pub mod backend_services_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the access control policy on the specified resource. Replaces any existing policy. + pub async fn set_iam_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.BackendServices/SetIamPolicy", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview pub async fn set_security_policy( &mut self, @@ -33746,6 +34366,26 @@ pub mod global_addresses_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation. + pub async fn set_labels( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.GlobalAddresses/SetLabels", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } /// Generated client implementations. @@ -37458,6 +38098,28 @@ pub mod interconnect_attachments_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation. + pub async fn set_labels( + &mut self, + request: impl tonic::IntoRequest< + super::SetLabelsInterconnectAttachmentRequest, + >, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.InterconnectAttachments/SetLabels", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } /// Generated client implementations. @@ -37765,6 +38427,26 @@ pub mod interconnects_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation. + pub async fn set_labels( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.Interconnects/SetLabels", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } /// Generated client implementations. @@ -41543,6 +42225,28 @@ pub mod region_backend_services_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Gets the access control policy for a resource. May be empty if no such policy or resource exists. + pub async fn get_iam_policy( + &mut self, + request: impl tonic::IntoRequest< + super::GetIamPolicyRegionBackendServiceRequest, + >, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionBackendServices/GetIamPolicy", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Creates a regional BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview. pub async fn insert( &mut self, @@ -41603,6 +42307,28 @@ pub mod region_backend_services_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the access control policy on the specified resource. Replaces any existing policy. + pub async fn set_iam_policy( + &mut self, + request: impl tonic::IntoRequest< + super::SetIamPolicyRegionBackendServiceRequest, + >, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionBackendServices/SetIamPolicy", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview . pub async fn update( &mut self, @@ -44603,6 +45329,203 @@ pub mod region_ssl_certificates_client { } } /// Generated client implementations. +pub mod region_ssl_policies_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// The RegionSslPolicies API. + #[derive(Debug, Clone)] + pub struct RegionSslPoliciesClient { + inner: tonic::client::Grpc, + } + impl RegionSslPoliciesClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl RegionSslPoliciesClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> RegionSslPoliciesClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + RegionSslPoliciesClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. + pub async fn delete( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionSslPolicies/Delete", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Lists all of the ordered rules present in a single specified policy. + pub async fn get( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionSslPolicies/Get", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Creates a new policy in the specified project and region using the data included in the request. + pub async fn insert( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionSslPolicies/Insert", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Lists all the SSL policies that have been configured for the specified project and region. + pub async fn list( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionSslPolicies/List", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Lists all features that can be specified in the SSL policy when using custom profile. + pub async fn list_available_features( + &mut self, + request: impl tonic::IntoRequest< + super::ListAvailableFeaturesRegionSslPoliciesRequest, + >, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionSslPolicies/ListAvailableFeatures", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Patches the specified SSL policy with the data included in the request. + pub async fn patch( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionSslPolicies/Patch", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// Generated client implementations. pub mod region_target_http_proxies_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -44997,6 +45920,160 @@ pub mod region_target_https_proxies_client { } } /// Generated client implementations. +pub mod region_target_tcp_proxies_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// The RegionTargetTcpProxies API. + #[derive(Debug, Clone)] + pub struct RegionTargetTcpProxiesClient { + inner: tonic::client::Grpc, + } + impl RegionTargetTcpProxiesClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl RegionTargetTcpProxiesClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> RegionTargetTcpProxiesClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + RegionTargetTcpProxiesClient::new( + InterceptedService::new(inner, interceptor), + ) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Deletes the specified TargetTcpProxy resource. + pub async fn delete( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionTargetTcpProxies/Delete", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Returns the specified TargetTcpProxy resource. + pub async fn get( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionTargetTcpProxies/Get", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Creates a TargetTcpProxy resource in the specified project and region using the data included in the request. + pub async fn insert( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionTargetTcpProxies/Insert", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Retrieves a list of TargetTcpProxy resources available to the specified project in a given region. + pub async fn list( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.RegionTargetTcpProxies/List", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// Generated client implementations. pub mod region_url_maps_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -46557,6 +47634,26 @@ pub mod security_policies_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation. + pub async fn set_labels( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.SecurityPolicies/SetLabels", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } /// Generated client implementations. @@ -47295,6 +48392,26 @@ pub mod ssl_policies_client { self.inner = self.inner.accept_compressed(encoding); self } + /// Retrieves the list of all SslPolicy resources, regional and global, available to the specified project. + pub async fn aggregated_list( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.SslPolicies/AggregatedList", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. pub async fn delete( &mut self, @@ -49525,6 +50642,26 @@ pub mod target_vpn_gateways_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation. + pub async fn set_labels( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.TargetVpnGateways/SetLabels", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } /// Generated client implementations. @@ -50184,6 +51321,26 @@ pub mod vpn_tunnels_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation. + pub async fn set_labels( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.compute.v1.VpnTunnels/SetLabels", + ); + self.inner.unary(request.into_request(), path, codec).await + } } } /// Generated client implementations. diff --git a/gcloud-sdk/genproto/google.cloud.contentwarehouse.v1.rs b/gcloud-sdk/genproto/google.cloud.contentwarehouse.v1.rs new file mode 100644 index 000000000..9f6e96693 --- /dev/null +++ b/gcloud-sdk/genproto/google.cloud.contentwarehouse.v1.rs @@ -0,0 +1,3161 @@ +/// Metadata object for CreateDocument request (currently empty). +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateDocumentMetadata { +} +/// Metadata object for UpdateDocument request (currently empty). +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateDocumentMetadata { +} +/// Meta information is used to improve the performance of the service. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestMetadata { + /// Provides user unique identification and groups information. + #[prost(message, optional, tag="1")] + pub user_info: ::core::option::Option, +} +/// Additional information returned to client, such as debugging information. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseMetadata { + /// A unique id associated with this call. This id is logged for tracking + /// purpose. + #[prost(string, tag="1")] + pub request_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserInfo { + /// A unique user identification string, as determined by the client. + /// The maximum number of allowed characters is 255. + /// Allowed characters include numbers 0 to 9, uppercase and lowercase letters, + /// and restricted special symbols (:, @, +, -, _, ~) + /// The format is "user:xxxx@example.com"; + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// The unique group identifications which the user is belong to. + /// The format is "group:yyyy@example.com"; + #[prost(string, repeated, tag="2")] + pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Options for Update operations. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOptions { + /// Type for update. + #[prost(enumeration="UpdateType", tag="1")] + pub update_type: i32, + /// Field mask for merging Document fields. + /// For the `FieldMask` definition, + /// see + /// + #[prost(message, optional, tag="2")] + pub update_mask: ::core::option::Option<::prost_types::FieldMask>, + /// Options for merging. + #[prost(message, optional, tag="3")] + pub merge_fields_options: ::core::option::Option, +} +/// Options for merging updated fields. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MergeFieldsOptions { + /// When merging message fields, the default behavior is to merge + /// the content of two message fields together. If you instead want to use + /// the field from the source message to replace the corresponding field in + /// the destination message, set this flag to true. When this flag is set, + /// specified submessage fields that are missing in source will be cleared in + /// destination. + #[prost(bool, optional, tag="1")] + pub replace_message_fields: ::core::option::Option, + /// When merging repeated fields, the default behavior is to append + /// entries from the source repeated field to the destination repeated field. + /// If you instead want to keep only the entries from the source repeated + /// field, set this flag to true. + /// + /// If you want to replace a repeated field within a message field on the + /// destination message, you must set both replace_repeated_fields and + /// replace_message_fields to true, otherwise the repeated fields will be + /// appended. + #[prost(bool, optional, tag="2")] + pub replace_repeated_fields: ::core::option::Option, +} +/// Update type of the requests. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UpdateType { + /// Defaults to full replace behavior, ie. FULL_REPLACE. + Unspecified = 0, + /// Fully replace all the fields. Any field masks will be ignored. + Replace = 1, + /// Merge the fields into the existing entities. + Merge = 2, + /// Inserts the properties by names. + InsertPropertiesByNames = 3, + /// Replace the properties by names. + ReplacePropertiesByNames = 4, + /// Delete the properties by names. + DeletePropertiesByNames = 5, +} +impl UpdateType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UpdateType::Unspecified => "UPDATE_TYPE_UNSPECIFIED", + UpdateType::Replace => "UPDATE_TYPE_REPLACE", + UpdateType::Merge => "UPDATE_TYPE_MERGE", + UpdateType::InsertPropertiesByNames => "UPDATE_TYPE_INSERT_PROPERTIES_BY_NAMES", + UpdateType::ReplacePropertiesByNames => "UPDATE_TYPE_REPLACE_PROPERTIES_BY_NAMES", + UpdateType::DeletePropertiesByNames => "UPDATE_TYPE_DELETE_PROPERTIES_BY_NAMES", + } + } +} +/// Type of database used by the customer +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum DatabaseType { + /// This value is required by protobuf best practices + DbUnknown = 0, + /// Internal Spanner + DbInfraSpanner = 1, + /// Cloud Sql with a Postgres Sql instance + DbCloudSqlPostgres = 2, +} +impl DatabaseType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DatabaseType::DbUnknown => "DB_UNKNOWN", + DatabaseType::DbInfraSpanner => "DB_INFRA_SPANNER", + DatabaseType::DbCloudSqlPostgres => "DB_CLOUD_SQL_POSTGRES", + } + } +} +/// Access Control Mode. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AccessControlMode { + /// This value is required by protobuf best practices + AclModeUnknown = 0, + /// Universal Access: No document level access control. + AclModeUniversalAccess = 1, + /// Document level access control with customer own Identity Service. + AclModeDocumentLevelAccessControlByoid = 2, + /// Document level access control using Google Cloud Identity. + AclModeDocumentLevelAccessControlGci = 3, +} +impl AccessControlMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AccessControlMode::AclModeUnknown => "ACL_MODE_UNKNOWN", + AccessControlMode::AclModeUniversalAccess => "ACL_MODE_UNIVERSAL_ACCESS", + AccessControlMode::AclModeDocumentLevelAccessControlByoid => "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_BYOID", + AccessControlMode::AclModeDocumentLevelAccessControlGci => "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_GCI", + } + } +} +/// Defines the structure for content warehouse document proto. +/// +/// Next ID: 20 +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Document { + /// The resource name of the document. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{document_id}. + /// + /// The name is ignored when creating a document. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// The reference ID set by customers. Must be unique per project and location. + #[prost(string, tag="11")] + pub reference_id: ::prost::alloc::string::String, + /// Required. Display name of the document given by the user. This name will be displayed + /// in the UI. + /// Customer can populate this field with the name of the document. This + /// differs from the 'title' field as 'title' is optional and stores the top + /// heading in the document. + #[prost(string, tag="2")] + pub display_name: ::prost::alloc::string::String, + /// Title that describes the document. + /// This is usually present in the top section of the document, and is a + /// mandatory field for the question-answering feature. + #[prost(string, tag="18")] + pub title: ::prost::alloc::string::String, + /// Uri to display the document, for example, in the UI. + #[prost(string, tag="17")] + pub display_uri: ::prost::alloc::string::String, + /// The Document schema name. + /// Format: + /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}. + #[prost(string, tag="3")] + pub document_schema_name: ::prost::alloc::string::String, + /// A path linked to structured content file. + #[prost(string, tag="16")] + pub structured_content_uri: ::prost::alloc::string::String, + /// List of values that are user supplied metadata. + #[prost(message, repeated, tag="7")] + pub properties: ::prost::alloc::vec::Vec, + /// Output only. The time when the document is last updated. + #[prost(message, optional, tag="8")] + pub update_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The time when the document is created. + #[prost(message, optional, tag="9")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// This is used when DocAI was not used to load the document and parsing/ + /// extracting is needed for the inline_raw_document. For example, if + /// inline_raw_document is the byte representation of a PDF file, then + /// this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF. + #[prost(enumeration="RawDocumentFileType", tag="10")] + pub raw_document_file_type: i32, + /// If true, makes the document visible to asynchronous policies and rules. + #[prost(bool, tag="12")] + pub async_enabled: bool, + /// If true, text extraction will not be performed. + #[prost(bool, tag="19")] + pub text_extraction_disabled: bool, + /// The user who creates the document. + #[prost(string, tag="13")] + pub creator: ::prost::alloc::string::String, + /// The user who lastly updates the document. + #[prost(string, tag="14")] + pub updater: ::prost::alloc::string::String, + #[prost(oneof="document::StructuredContent", tags="15, 4")] + pub structured_content: ::core::option::Option, + /// Raw document file. + #[prost(oneof="document::RawDocument", tags="5, 6")] + pub raw_document: ::core::option::Option, +} +/// Nested message and enum types in `Document`. +pub mod document { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum StructuredContent { + /// Other document format, such as PPTX, XLXS + #[prost(string, tag="15")] + PlainText(::prost::alloc::string::String), + /// Document AI format to save the structured content, including OCR. + #[prost(message, tag="4")] + CloudAiDocument(super::super::super::documentai::v1::Document), + } + /// Raw document file. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum RawDocument { + /// Raw document file in Cloud Storage path. + #[prost(string, tag="5")] + RawDocumentPath(::prost::alloc::string::String), + /// Raw document content. + #[prost(bytes, tag="6")] + InlineRawDocument(::prost::alloc::vec::Vec), + } +} +/// References to the documents. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DocumentReference { + /// Required. Name of the referenced document. + #[prost(string, tag="1")] + pub document_name: ::prost::alloc::string::String, + /// display_name of the referenced document; this name does not need to be + /// consistent to the display_name in the Document proto, depending on the ACL + /// constraint. + #[prost(string, tag="2")] + pub display_name: ::prost::alloc::string::String, + /// Stores the subset of the referenced document's content. + /// This is useful to allow user peek the information of the referenced + /// document. + #[prost(string, tag="3")] + pub snippet: ::prost::alloc::string::String, + /// The document type of the document being referenced. + #[prost(bool, tag="4")] + pub document_is_folder: bool, + /// Output only. The time when the document is last updated. + #[prost(message, optional, tag="5")] + pub update_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The time when the document is created. + #[prost(message, optional, tag="6")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The time when the document is deleted. + #[prost(message, optional, tag="7")] + pub delete_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Property of a document. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Property { + /// Required. Must match the name of a PropertyDefinition in the DocumentSchema. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Type of the property. + /// Must match the property_options type of the matching PropertyDefinition. + /// Value of the Property parsed into a specific data type. + /// Specific type value(s) obtained from Document AIs Property.mention_text + /// field. + #[prost(oneof="property::Values", tags="2, 3, 4, 5, 6, 7, 8, 9, 10")] + pub values: ::core::option::Option, +} +/// Nested message and enum types in `Property`. +pub mod property { + /// Type of the property. + /// Must match the property_options type of the matching PropertyDefinition. + /// Value of the Property parsed into a specific data type. + /// Specific type value(s) obtained from Document AIs Property.mention_text + /// field. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Values { + /// Integer property values. + #[prost(message, tag="2")] + IntegerValues(super::IntegerArray), + /// Float property values. + #[prost(message, tag="3")] + FloatValues(super::FloatArray), + /// String/text property values. + #[prost(message, tag="4")] + TextValues(super::TextArray), + /// Enum property values. + #[prost(message, tag="5")] + EnumValues(super::EnumArray), + /// Nested structured data property values. + #[prost(message, tag="6")] + PropertyValues(super::PropertyArray), + /// Date time property values. + /// It is not supported by CMEK compliant deployment. + #[prost(message, tag="7")] + DateTimeValues(super::DateTimeArray), + /// Map property values. + #[prost(message, tag="8")] + MapProperty(super::MapProperty), + /// Timestamp property values. + /// It is not supported by CMEK compliant deployment. + #[prost(message, tag="9")] + TimestampValues(super::TimestampArray), + /// Boolean property values. + /// It is not supported by CMEK compliant deployment. + #[prost(message, tag="10")] + BooleanValues(super::BooleanArray), + } +} +/// Integer values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IntegerArray { + /// List of integer values. + #[prost(int32, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec, +} +/// Float values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FloatArray { + /// List of float values. + #[prost(float, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec, +} +/// String/text values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TextArray { + /// List of text values. + #[prost(string, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Enum values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EnumArray { + /// List of enum values. + #[prost(string, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// DateTime values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DateTimeArray { + /// List of datetime values. + /// Both OffsetDateTime and ZonedDateTime are supported. + #[prost(message, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec, +} +/// Timestamp values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimestampArray { + /// List of timestamp values. + #[prost(message, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec, +} +/// Boolean values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BooleanArray { + /// List of bool values. + #[prost(bool, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec, +} +/// Timestamp value type. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimestampValue { + #[prost(oneof="timestamp_value::Value", tags="1, 2")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `TimestampValue`. +pub mod timestamp_value { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + /// Timestamp value + #[prost(message, tag="1")] + TimestampValue(::prost_types::Timestamp), + /// The string must represent a valid instant in UTC and is parsed using + /// java.time.format.DateTimeFormatter.ISO_INSTANT. + /// e.g. "2013-09-29T18:46:19Z" + #[prost(string, tag="2")] + TextValue(::prost::alloc::string::String), + } +} +/// Property values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PropertyArray { + /// List of property values. + #[prost(message, repeated, tag="1")] + pub properties: ::prost::alloc::vec::Vec, +} +/// Map property value. +/// Represents a structured entries of key value pairs, consisting of field names +/// which map to dynamically typed values. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MapProperty { + /// Unordered map of dynamically typed values. + #[prost(map="string, message", tag="1")] + pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>, +} +/// `Value` represents a dynamically typed value which can be either be +/// a float, a integer, a string, or a datetime value. A producer of value is +/// expected to set one of these variants. Absence of any variant indicates an +/// error. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Value { + /// The kind of value. + #[prost(oneof="value::Kind", tags="1, 2, 3, 4, 5, 6, 7")] + pub kind: ::core::option::Option, +} +/// Nested message and enum types in `Value`. +pub mod value { + /// The kind of value. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Kind { + /// Represents a float value. + #[prost(float, tag="1")] + FloatValue(f32), + /// Represents a integer value. + #[prost(int32, tag="2")] + IntValue(i32), + /// Represents a string value. + #[prost(string, tag="3")] + StringValue(::prost::alloc::string::String), + /// Represents an enum value. + #[prost(message, tag="4")] + EnumValue(super::EnumValue), + /// Represents a datetime value. + #[prost(message, tag="5")] + DatetimeValue(super::super::super::super::r#type::DateTime), + /// Represents a timestamp value. + #[prost(message, tag="6")] + TimestampValue(super::TimestampValue), + /// Represents a boolean value. + #[prost(bool, tag="7")] + BooleanValue(bool), + } +} +/// Represents the string value of the enum field. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EnumValue { + /// String value of the enum field. This must match defined set of enums + /// in document schema using EnumTypeOptions. + #[prost(string, tag="1")] + pub value: ::prost::alloc::string::String, +} +/// When a raw document is supplied, this indicates the file format +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum RawDocumentFileType { + /// No raw document specified or it is non-parsable + Unspecified = 0, + /// Adobe PDF format + Pdf = 1, + /// Microsoft Word format + Docx = 2, + /// Microsoft Excel format + Xlsx = 3, + /// Microsoft Powerpoint format + Pptx = 4, + /// UTF-8 encoded text format + Text = 5, +} +impl RawDocumentFileType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RawDocumentFileType::Unspecified => "RAW_DOCUMENT_FILE_TYPE_UNSPECIFIED", + RawDocumentFileType::Pdf => "RAW_DOCUMENT_FILE_TYPE_PDF", + RawDocumentFileType::Docx => "RAW_DOCUMENT_FILE_TYPE_DOCX", + RawDocumentFileType::Xlsx => "RAW_DOCUMENT_FILE_TYPE_XLSX", + RawDocumentFileType::Pptx => "RAW_DOCUMENT_FILE_TYPE_PPTX", + RawDocumentFileType::Text => "RAW_DOCUMENT_FILE_TYPE_TEXT", + } + } +} +/// Response message for DocumentLinkService.ListLinkedTargets. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLinkedTargetsResponse { + /// Target document-links. + #[prost(message, repeated, tag="1")] + pub document_links: ::prost::alloc::vec::Vec, + /// A token, which can be sent as `page_token` to retrieve the next page. + /// If this field is omitted, there are no subsequent pages. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Request message for DocumentLinkService.ListLinkedTargets. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLinkedTargetsRequest { + /// Required. The name of the document, for which all target links are returned. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{target_document_id}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The meta information collected about the document creator, used to enforce + /// access control for the service. + #[prost(message, optional, tag="2")] + pub request_metadata: ::core::option::Option, +} +/// Response message for DocumentLinkService.ListLinkedSources. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLinkedSourcesResponse { + /// Source document-links. + #[prost(message, repeated, tag="1")] + pub document_links: ::prost::alloc::vec::Vec, + /// A token, which can be sent as `page_token` to retrieve the next page. + /// If this field is omitted, there are no subsequent pages. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Response message for DocumentLinkService.ListLinkedSources. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLinkedSourcesRequest { + /// Required. The name of the document, for which all source links are returned. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{source_document_id}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of document-links to return. The service may return + /// fewer than this value. + /// + /// If unspecified, at most 50 document-links will be returned. + /// The maximum value is 1000; values above 1000 will be coerced to 1000. + #[prost(int32, tag="3")] + pub page_size: i32, + /// A page token, received from a previous `ListLinkedSources` call. + /// Provide this to retrieve the subsequent page. + /// + /// When paginating, all other parameters provided to `ListLinkedSources` + /// must match the call that provided the page token. + #[prost(string, tag="4")] + pub page_token: ::prost::alloc::string::String, + /// The meta information collected about the document creator, used to enforce + /// access control for the service. + #[prost(message, optional, tag="2")] + pub request_metadata: ::core::option::Option, +} +/// A document-link between source and target document. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DocumentLink { + /// Name of this document-link. + /// It is required that the parent derived form the name to be consistent with + /// the source document reference. Otherwise an exception will be thrown. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Document references of the source document. + #[prost(message, optional, tag="2")] + pub source_document_reference: ::core::option::Option, + /// Document references of the target document. + #[prost(message, optional, tag="3")] + pub target_document_reference: ::core::option::Option, + /// Description of this document-link. + #[prost(string, tag="4")] + pub description: ::prost::alloc::string::String, + /// Output only. The time when the documentLink is last updated. + #[prost(message, optional, tag="5")] + pub update_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The time when the documentLink is created. + #[prost(message, optional, tag="6")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// The state of the documentlink. If target node has been deleted, the + /// link is marked as invalid. Removing a source node will result in removal + /// of all associated links. + #[prost(enumeration="document_link::State", tag="7")] + pub state: i32, +} +/// Nested message and enum types in `DocumentLink`. +pub mod document_link { + /// The state of a document-link. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum State { + /// Unknown state of documentlink. + Unspecified = 0, + /// The documentlink has both source and target documents detected. + Active = 1, + /// Target document is deleted, and mark the documentlink as soft-deleted. + SoftDeleted = 2, + } + impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::Unspecified => "STATE_UNSPECIFIED", + State::Active => "ACTIVE", + State::SoftDeleted => "SOFT_DELETED", + } + } + } +} +/// Request message for DocumentLinkService.CreateDocumentLink. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateDocumentLinkRequest { + /// Required. Parent of the document-link to be created. + /// parent of document-link should be a document. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{source_document_id}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// Required. Document links associated with the source documents (source_document_id). + #[prost(message, optional, tag="2")] + pub document_link: ::core::option::Option, + /// The meta information collected about the document creator, used to enforce + /// access control for the service. + #[prost(message, optional, tag="3")] + pub request_metadata: ::core::option::Option, +} +/// Request message for DocumentLinkService.DeleteDocumentLink. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteDocumentLinkRequest { + /// Required. The name of the document-link to be deleted. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// The meta information collected about the document creator, used to enforce + /// access control for the service. + #[prost(message, optional, tag="2")] + pub request_metadata: ::core::option::Option, +} +/// Generated client implementations. +pub mod document_link_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// This service lets you manage document-links. + /// Document-Links are treated as sub-resources under source documents. + #[derive(Debug, Clone)] + pub struct DocumentLinkServiceClient { + inner: tonic::client::Grpc, + } + impl DocumentLinkServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl DocumentLinkServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> DocumentLinkServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + DocumentLinkServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Return all target document-links from the document. + pub async fn list_linked_targets( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentLinkService/ListLinkedTargets", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Return all source document-links from the document. + pub async fn list_linked_sources( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentLinkService/ListLinkedSources", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Create a link between a source document and a target document. + pub async fn create_document_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentLinkService/CreateDocumentLink", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Remove the link between the source and target documents. + pub async fn delete_document_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentLinkService/DeleteDocumentLink", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// A document schema used to define document structure. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DocumentSchema { + /// The resource name of the document schema. + /// Format: + /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}. + /// + /// The name is ignored when creating a document schema. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Required. Name of the schema given by the user. Must be unique per customer. + #[prost(string, tag="2")] + pub display_name: ::prost::alloc::string::String, + /// Document details. + #[prost(message, repeated, tag="3")] + pub property_definitions: ::prost::alloc::vec::Vec, + /// Document Type, true refers the document is a folder, otherwise it is + /// a typical document. + #[prost(bool, tag="4")] + pub document_is_folder: bool, + /// Output only. The time when the document schema is last updated. + #[prost(message, optional, tag="5")] + pub update_time: ::core::option::Option<::prost_types::Timestamp>, + /// Output only. The time when the document schema is created. + #[prost(message, optional, tag="6")] + pub create_time: ::core::option::Option<::prost_types::Timestamp>, + /// Schema description. + #[prost(string, tag="7")] + pub description: ::prost::alloc::string::String, +} +/// Defines the metadata for a schema property. +/// +/// Next ID: 18 +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PropertyDefinition { + /// Required. The name of the metadata property. + /// Must be unique within a document schema and is case insensitive. + /// Names must be non-blank, start with a letter, and can contain alphanumeric + /// characters and: /, :, -, _, and . + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// The display-name for the property, used for front-end. + #[prost(string, tag="12")] + pub display_name: ::prost::alloc::string::String, + /// Whether the property can have multiple values. + #[prost(bool, tag="2")] + pub is_repeatable: bool, + /// Whether the property can be filtered. If this is a sub-property, all the + /// parent properties must be marked filterable. + #[prost(bool, tag="3")] + pub is_filterable: bool, + /// Indicates that the property should be included in a global search. + #[prost(bool, tag="4")] + pub is_searchable: bool, + /// Whether the property is user supplied metadata. + #[prost(bool, tag="5")] + pub is_metadata: bool, + /// Whether the property is mandatory. + /// Default is 'false', i.e. populating property value can be skipped. + /// If 'true' then user must populate the value for this property. + #[prost(bool, tag="14")] + pub is_required: bool, + /// Type of the property. + #[prost(oneof="property_definition::ValueTypeOptions", tags="7, 8, 9, 10, 11, 13, 15, 16, 17")] + pub value_type_options: ::core::option::Option, +} +/// Nested message and enum types in `PropertyDefinition`. +pub mod property_definition { + /// Type of the property. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum ValueTypeOptions { + /// Integer property. + #[prost(message, tag="7")] + IntegerTypeOptions(super::IntegerTypeOptions), + /// Float property. + #[prost(message, tag="8")] + FloatTypeOptions(super::FloatTypeOptions), + /// Text/string property. + #[prost(message, tag="9")] + TextTypeOptions(super::TextTypeOptions), + /// Nested structured data property. + #[prost(message, tag="10")] + PropertyTypeOptions(super::PropertyTypeOptions), + /// Enum/categorical property. + #[prost(message, tag="11")] + EnumTypeOptions(super::EnumTypeOptions), + /// Date time property. + /// It is not supported by CMEK compliant deployment. + #[prost(message, tag="13")] + DateTimeTypeOptions(super::DateTimeTypeOptions), + /// Map property. + #[prost(message, tag="15")] + MapTypeOptions(super::MapTypeOptions), + /// Timestamp property. + /// It is not supported by CMEK compliant deployment. + #[prost(message, tag="16")] + TimestampTypeOptions(super::TimestampTypeOptions), + /// Boolean property. + /// It is not supported by CMEK compliant deployment. + #[prost(message, tag="17")] + BooleanTypeOptions(super::BooleanTypeOptions), + } +} +/// Configurations for an integer property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IntegerTypeOptions { +} +/// Configurations for a float property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FloatTypeOptions { +} +/// Configurations for a text property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TextTypeOptions { +} +/// Configurations for a date time property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DateTimeTypeOptions { +} +/// Configurations for a Map property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MapTypeOptions { +} +/// Configurations for a timestamp property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimestampTypeOptions { +} +/// Configurations for a boolean property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BooleanTypeOptions { +} +/// Configurations for a nested structured data property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PropertyTypeOptions { + /// Required. List of property definitions. + #[prost(message, repeated, tag="1")] + pub property_definitions: ::prost::alloc::vec::Vec, +} +/// Configurations for an enum/categorical property. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EnumTypeOptions { + /// Required. List of possible enum values. + #[prost(string, repeated, tag="1")] + pub possible_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Request message for DocumentSchemaService.CreateDocumentSchema. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateDocumentSchemaRequest { + /// Required. The parent name. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// Required. The document schema to create. + #[prost(message, optional, tag="2")] + pub document_schema: ::core::option::Option, +} +/// Request message for DocumentSchemaService.GetDocumentSchema. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDocumentSchemaRequest { + /// Required. The name of the document schema to retrieve. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Request message for DocumentSchemaService.UpdateDocumentSchema. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateDocumentSchemaRequest { + /// Required. The name of the document schema to update. + /// Format: + /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Required. The document schema to update with. + #[prost(message, optional, tag="2")] + pub document_schema: ::core::option::Option, +} +/// Request message for DocumentSchemaService.DeleteDocumentSchema. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteDocumentSchemaRequest { + /// Required. The name of the document schema to delete. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Request message for DocumentSchemaService.ListDocumentSchemas. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDocumentSchemasRequest { + /// Required. The parent, which owns this collection of document schemas. + /// Format: projects/{project_number}/locations/{location}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of document schemas to return. The service may return + /// fewer than this value. + /// If unspecified, at most 50 document schemas will be returned. + /// The maximum value is 1000; values above 1000 will be coerced to 1000. + #[prost(int32, tag="2")] + pub page_size: i32, + /// A page token, received from a previous `ListDocumentSchemas` call. + /// Provide this to retrieve the subsequent page. + /// + /// When paginating, all other parameters provided to `ListDocumentSchemas` + /// must match the call that provided the page token. + #[prost(string, tag="3")] + pub page_token: ::prost::alloc::string::String, +} +/// Response message for DocumentSchemaService.ListDocumentSchemas. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDocumentSchemasResponse { + /// The document schemas from the specified parent. + #[prost(message, repeated, tag="1")] + pub document_schemas: ::prost::alloc::vec::Vec, + /// A token, which can be sent as `page_token` to retrieve the next page. + /// If this field is omitted, there are no subsequent pages. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Generated client implementations. +pub mod document_schema_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct DocumentSchemaServiceClient { + inner: tonic::client::Grpc, + } + impl DocumentSchemaServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl DocumentSchemaServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> DocumentSchemaServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + DocumentSchemaServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Creates a document schema. + pub async fn create_document_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentSchemaService/CreateDocumentSchema", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Updates a Document Schema. Returns INVALID_ARGUMENT if the name of the + /// Document Schema is non-empty and does not equal the existing name. + /// Supports only appending new properties and updating existing properties + /// will result into INVALID_ARGUMENT. + pub async fn update_document_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentSchemaService/UpdateDocumentSchema", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Gets a document schema. Returns NOT_FOUND if the document schema does not + /// exist. + pub async fn get_document_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentSchemaService/GetDocumentSchema", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Deletes a document schema. Returns NOT_FOUND if the document schema does + /// not exist. + pub async fn delete_document_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentSchemaService/DeleteDocumentSchema", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Lists document schemas. + pub async fn list_document_schemas( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentSchemaService/ListDocumentSchemas", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// NEXT_ID: 13 +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DocumentQuery { + /// The query string that matches against the full text of the document and + /// the searchable properties. + /// The maximum number of allowed characters is 255. + #[prost(string, tag="1")] + pub query: ::prost::alloc::string::String, + /// Experimental, do not use. + /// If the query is a natural language question. False by default. If true, + /// then the question-answering feature will be used instead of search, and + /// `result_count` in \[SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest\] must be set. In addition, all + /// other input fields related to search (pagination, histograms, etc.) will be + /// ignored. + #[prost(bool, tag="12")] + pub is_nl_query: bool, + /// This filter specifies a structured syntax to match against the + /// \[PropertyDefinition].[is_filterable][\] marked as `true`. The syntax for + /// this expression is a subset of SQL syntax. + /// + /// Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the left + /// of the operator is a property name and the right of the operator is a + /// number or a quoted string. You must escape backslash (\\) and quote (\") + /// characters. Supported functions are `LOWER(\[property_name\])` to perform a + /// case insensitive match and `EMPTY(\[property_name\])` to filter on the + /// existence of a key. + /// + /// Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting + /// (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + /// comparisons or functions are allowed in the expression. The expression must + /// be < 6000 bytes in length. + /// + /// Sample Query: + /// `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND + /// driving_years > 10` + #[deprecated] + #[prost(string, tag="4")] + pub custom_property_filter: ::prost::alloc::string::String, + /// Documents created/updated within a range specified by this filter are + /// searched against. + #[prost(message, repeated, tag="5")] + pub time_filters: ::prost::alloc::vec::Vec, + /// This filter specifies the exact document schema + /// \[Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name\] of the documents to search against. + /// + /// If a value isn't specified, documents within the search results are + /// associated with any schema. If multiple values are specified, documents + /// within the search results may be associated with any of the specified + /// schemas. + /// + /// At most 20 document schema names are allowed. + #[prost(string, repeated, tag="6")] + pub document_schema_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// This filter specifies a structured syntax to match against the + /// \[PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable\] marked as `true`. The relationship + /// between the PropertyFilters is OR. + #[prost(message, repeated, tag="7")] + pub property_filter: ::prost::alloc::vec::Vec, + /// This filter specifies the types of files to return: ALL, FOLDER, or FILE. + /// If FOLDER or FILE is specified, then only either folders or files will be + /// returned, respectively. If ALL is specified, both folders and files will be + /// returned. + /// + /// If no value is specified, ALL files will be returned. + #[prost(message, optional, tag="8")] + pub file_type_filter: ::core::option::Option, + /// Search all the documents under this specified folder. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{document_id}. + #[prost(string, tag="9")] + pub folder_name_filter: ::prost::alloc::string::String, + /// For custom synonyms. + /// Customers provide the synonyms based on context. One customer can provide + /// multiple set of synonyms based on different context. The search query will + /// be expanded based on the custom synonyms of the query context set. + /// By default, no custom synonyms wll be applied if no query context is + /// provided. + /// It is not supported for CMEK compliant deployment. + #[prost(string, repeated, tag="10")] + pub query_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// The exact creator(s) of the documents to search against. + /// + /// If a value isn't specified, documents within the search results are + /// associated with any creator. If multiple values are specified, documents + /// within the search results may be associated with any of the specified + /// creators. + #[prost(string, repeated, tag="11")] + pub document_creator_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Filter on create timestamp or update timestamp of documents. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimeFilter { + #[prost(message, optional, tag="1")] + pub time_range: ::core::option::Option, + /// Specifies which time field to filter documents on. + /// + /// Defaults to \[TimeField.UPLOAD_TIME][\]. + #[prost(enumeration="time_filter::TimeField", tag="2")] + pub time_field: i32, +} +/// Nested message and enum types in `TimeFilter`. +pub mod time_filter { + /// Time field used in TimeFilter. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum TimeField { + /// Default value. + Unspecified = 0, + /// Earliest document create time. + CreateTime = 1, + /// Latest document update time. + UpdateTime = 2, + } + impl TimeField { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TimeField::Unspecified => "TIME_FIELD_UNSPECIFIED", + TimeField::CreateTime => "CREATE_TIME", + TimeField::UpdateTime => "UPDATE_TIME", + } + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PropertyFilter { + /// The Document schema name \[Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name\]. + /// Format: + /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}. + #[prost(string, tag="1")] + pub document_schema_name: ::prost::alloc::string::String, + /// The filter condition. + /// The syntax for this expression is a subset of SQL syntax. + /// + /// Supported operators are: `=`, `!=`, `<`, `<=`, `>`, `>=`, and `~~` where + /// the left of the operator is a property name and the right of the operator + /// is a number or a quoted string. You must escape backslash (\\) and quote + /// (\") characters. + /// + /// `~~` is the LIKE operator. The right of the operator must be a string. The + /// only supported property data type for LIKE is text_values. It provides + /// semantic search functionality by parsing, stemming and doing synonyms + /// expansion against the input query. It matches if the property contains + /// semantic similar content to the query. It is not regex matching or wildcard + /// matching. For example, "property.company ~~ \"google\"" will match records + /// whose property `property.compnay` have values like "Google Inc.", "Google + /// LLC" or "Google Company". + /// + /// Supported functions are `LOWER(\[property_name\])` to perform a + /// case insensitive match and `EMPTY(\[property_name\])` to filter on the + /// existence of a key. + /// + /// Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting + /// (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + /// comparisons or functions are allowed in the expression. The expression must + /// be < 6000 bytes in length. + /// + /// Only properties that are marked filterable are allowed + /// (\[PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable\]). Property names do not need to be + /// prefixed by the document schema id (as is the case with histograms), + /// however property names will need to be prefixed by its parent hierarchy, if + /// any. For example: top_property_name.sub_property_name. + /// + /// Sample Query: + /// `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND + /// driving_years > 10` + /// + /// + /// CMEK compliant deployment only supports: + /// + /// * Operators: `=`, `<`, `<=`, `>`, and `>=`. + /// * Boolean expressions: AND and OR. + #[prost(string, tag="2")] + pub condition: ::prost::alloc::string::String, +} +/// Filter for the specific types of documents returned. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FileTypeFilter { + /// The type of files to return. + #[prost(enumeration="file_type_filter::FileType", tag="1")] + pub file_type: i32, +} +/// Nested message and enum types in `FileTypeFilter`. +pub mod file_type_filter { + /// Representation of the types of files. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum FileType { + /// Default document type. If set, disables the filter. + Unspecified = 0, + /// Returns all document types, including folders. + All = 1, + /// Returns only folders. + Folder = 2, + /// Returns only non-folder documents. + Document = 3, + } + impl FileType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FileType::Unspecified => "FILE_TYPE_UNSPECIFIED", + FileType::All => "ALL", + FileType::Folder => "FOLDER", + FileType::Document => "DOCUMENT", + } + } + } +} +/// The histogram request. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HistogramQuery { + /// An expression specifies a histogram request against matching documents for + /// searches. + /// + /// See \[SearchDocumentsRequest.histogram_queries][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.histogram_queries\] for details about syntax. + #[prost(string, tag="1")] + pub histogram_query: ::prost::alloc::string::String, + /// Controls if the histogram query requires the return of a precise count. + /// Enable this flag may adversely impact performance. + /// + /// Defaults to true. + #[prost(bool, tag="2")] + pub require_precise_result_size: bool, + /// Optional. Filter the result of histogram query by the property names. It only works + /// with histogram query count('FilterableProperties'). + /// It is an optional. It will perform histogram on all the property names for + /// all the document schemas. Setting this field will have a better + /// performance. + #[prost(message, optional, tag="3")] + pub filters: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HistogramQueryPropertyNameFilter { + /// This filter specifies the exact document schema(s) + /// \[Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name\] to run histogram query against. + /// It is optional. It will perform histogram for property names for all the + /// document schemas if it is not set. + /// + /// At most 10 document schema names are allowed. + /// Format: + /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}. + #[prost(string, repeated, tag="1")] + pub document_schemas: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// It is optional. It will perform histogram for all the property names if it + /// is not set. + /// The properties need to be defined with the is_filterable flag set to + /// true and the name of the property should be in the format: + /// "schemaId.propertyName". The property needs to be defined in the schema. + /// Example: the schema id is abc. Then the name of property for property + /// MORTGAGE_TYPE will be "abc.MORTGAGE_TYPE". + #[prost(string, repeated, tag="2")] + pub property_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// By default, the y_axis is HISTOGRAM_YAXIS_DOCUMENT if this field is not + /// set. + #[prost(enumeration="histogram_query_property_name_filter::HistogramYAxis", tag="3")] + pub y_axis: i32, +} +/// Nested message and enum types in `HistogramQueryPropertyNameFilter`. +pub mod histogram_query_property_name_filter { + /// The result of the histogram query count('FilterableProperties') using + /// HISTOGRAM_YAXIS_DOCUMENT will be: + /// invoice_id: 2 + /// address: 1 + /// payment_method: 2 + /// line_item_description: 1 + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum HistogramYAxis { + /// Count the documents per property name. + HistogramYaxisDocument = 0, + /// Count the properties per property name. + HistogramYaxisProperty = 1, + } + impl HistogramYAxis { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + HistogramYAxis::HistogramYaxisDocument => "HISTOGRAM_YAXIS_DOCUMENT", + HistogramYAxis::HistogramYaxisProperty => "HISTOGRAM_YAXIS_PROPERTY", + } + } + } +} +/// Histogram result that matches \[HistogramQuery][google.cloud.contentwarehouse.v1.HistogramQuery\] specified in searches. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HistogramQueryResult { + /// Requested histogram expression. + #[prost(string, tag="1")] + pub histogram_query: ::prost::alloc::string::String, + /// A map from the values of the facet associated with distinct values to the + /// number of matching entries with corresponding value. + /// + /// The key format is: + /// + /// * (for string histogram) string values stored in the field. + #[prost(map="string, int64", tag="2")] + pub histogram: ::std::collections::HashMap<::prost::alloc::string::String, i64>, +} +/// Request Option for processing Cloud AI Document in CW Document. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CloudAiDocumentOption { + /// Whether to convert all the entities to properties. + #[prost(bool, tag="1")] + pub enable_entities_conversions: bool, + /// If set, only selected entities will be converted to properties. + #[prost(map="string, string", tag="2")] + pub customized_entities_properties_conversions: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, +} +/// Request message for DocumentService.CreateDocument. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateDocumentRequest { + /// Required. The parent name. + /// Format: projects/{project_number}/locations/{location}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// Required. The document to create. + #[prost(message, optional, tag="2")] + pub document: ::core::option::Option, + /// The meta information collected about the end user, used to enforce access + /// control for the service. + #[prost(message, optional, tag="3")] + pub request_metadata: ::core::option::Option, + /// Default document policy during creation. Conditions defined in the policy + /// will be ignored. + #[prost(message, optional, tag="4")] + pub policy: ::core::option::Option, + /// Request Option for processing Cloud AI Document in CW Document. + #[prost(message, optional, tag="5")] + pub cloud_ai_document_option: ::core::option::Option, + /// Field mask for creating Document fields. If mask path is empty, + /// it means all fields are masked. + /// For the `FieldMask` definition, + /// see + /// + #[prost(message, optional, tag="6")] + pub create_mask: ::core::option::Option<::prost_types::FieldMask>, +} +/// Request message for DocumentService.GetDocument. +/// +/// Next ID: 4 +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDocumentRequest { + /// Required. The name of the document to retrieve. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{document_id} or + /// projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// The meta information collected about the end user, used to enforce access + /// control for the service. + #[prost(message, optional, tag="2")] + pub request_metadata: ::core::option::Option, +} +/// Request message for DocumentService.UpdateDocument. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateDocumentRequest { + /// Required. The name of the document to update. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{document_id} + /// or + /// projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Required. The document to update. + #[prost(message, optional, tag="2")] + pub document: ::core::option::Option, + /// The meta information collected about the end user, used to enforce access + /// control for the service. + #[prost(message, optional, tag="3")] + pub request_metadata: ::core::option::Option, + /// Request Option for processing Cloud AI Document in CW Document. + #[prost(message, optional, tag="5")] + pub cloud_ai_document_option: ::core::option::Option, + /// Options for the update operation. + #[prost(message, optional, tag="6")] + pub update_options: ::core::option::Option, +} +/// Request message for DocumentService.DeleteDocument. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteDocumentRequest { + /// Required. The name of the document to delete. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{document_id} + /// or + /// projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// The meta information collected about the end user, used to enforce access + /// control for the service. + #[prost(message, optional, tag="2")] + pub request_metadata: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchDocumentsRequest { + /// Required. The parent, which owns this collection of documents. + /// Format: projects/{project_number}/locations/{location}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The meta information collected about the end user, used to enforce access + /// control and improve the search quality of the service. + #[prost(message, optional, tag="3")] + pub request_metadata: ::core::option::Option, + /// Query used to search against documents (keyword, filters, etc.). + #[prost(message, optional, tag="4")] + pub document_query: ::core::option::Option, + /// An integer that specifies the current offset (that is, starting result + /// location, amongst the documents deemed by the API as relevant) in search + /// results. This field is only considered if \[page_token][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.page_token\] is unset. + /// + /// The maximum allowed value is 5000. Otherwise an error is thrown. + /// + /// For example, 0 means to return results starting from the first matching + /// document, and 10 means to return from the 11th document. This can be used + /// for pagination, (for example, pageSize = 10 and offset = 10 means to return + /// from the second page). + #[prost(int32, tag="5")] + pub offset: i32, + /// A limit on the number of documents returned in the search results. + /// Increasing this value above the default value of 10 can increase search + /// response time. The value can be between 1 and 100. + #[prost(int32, tag="6")] + pub page_size: i32, + /// The token specifying the current offset within search results. + /// See \[SearchDocumentsResponse.next_page_token][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.next_page_token\] for an explanation of how + /// to obtain the next set of query results. + #[prost(string, tag="7")] + pub page_token: ::prost::alloc::string::String, + /// The criteria determining how search results are sorted. For non-empty + /// query, default is `"relevance desc"`. For empty query, default is + /// `"upload_date desc"`. + /// + /// Supported options are: + /// + /// * `"relevance desc"`: By relevance descending, as determined by the API + /// algorithms. + /// * `"upload_date desc"`: By upload date descending. + /// * `"upload_date"`: By upload date ascending. + /// * `"update_date desc"`: By last updated date descending. + /// * `"update_date"`: By last updated date ascending. + #[prost(string, tag="8")] + pub order_by: ::prost::alloc::string::String, + /// An expression specifying a histogram request against matching + /// documents. Expression syntax is an aggregation function call with + /// histogram facets and other options. + /// + /// The following aggregation functions are supported: + /// + /// * `count(string_histogram_facet)`: Count the number of matching entities + /// for each distinct attribute value. + /// + /// Data types: + /// + /// * Histogram facet (aka filterable properties): Facet names with format + /// <schema id>.<facet>. Facets will have the + /// format of: \[a-zA-Z][a-zA-Z0-9_:/-.\]. If the facet is a child + /// facet, then the parent hierarchy needs to be specified separated by + /// dots in the prefix after the schema id. Thus, the format for a multi- + /// level facet is: <schema id>.<parent facet name>. + /// <child facet name>. Example: + /// schema123.root_parent_facet.middle_facet.child_facet + /// * DocumentSchemaId: (with no schema id prefix) to get + /// histograms for each document type (returns the schema id path, e.g. + /// projects/12345/locations/us-west/documentSchemas/abc123). + /// + /// Example expression: + /// + /// * Document type counts: + /// count('DocumentSchemaId') + /// + /// * For schema id, abc123, get the counts for MORTGAGE_TYPE: + /// count('abc123.MORTGAGE_TYPE') + #[prost(message, repeated, tag="9")] + pub histogram_queries: ::prost::alloc::vec::Vec, + /// Optional. Controls if the search document request requires the return of a total size + /// of matched documents. See \[SearchDocumentsResponse.total_size][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.total_size\]. + /// + /// Enabling this flag may adversely impact performance. + /// + /// Defaults to false. + #[prost(bool, tag="10")] + pub require_total_size: bool, + /// Experimental, do not use. + /// The limit on the number of documents returned for the question-answering + /// feature. To enable the question-answering feature, set + /// \[DocumentQuery].[is_nl_query][\] to true. + #[prost(int32, tag="11")] + pub qa_size_limit: i32, +} +/// Request message for DocumentService.FetchAcl +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchAclRequest { + /// Required. REQUIRED: The resource for which the policy is being requested. + /// Format for document: + /// projects/{project_number}/locations/{location}/documents/{document_id}. + /// Format for project: projects/{project_number}. + #[prost(string, tag="1")] + pub resource: ::prost::alloc::string::String, + /// The meta information collected about the end user, used to enforce access + /// control for the service. + #[prost(message, optional, tag="2")] + pub request_metadata: ::core::option::Option, + /// For Get Project ACL only. Authorization check for end user will be ignored + /// when project_owner=true. + #[prost(bool, tag="3")] + pub project_owner: bool, +} +/// Request message for DocumentService.SetAcl. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetAclRequest { + /// Required. REQUIRED: The resource for which the policy is being requested. + /// Format for document: + /// projects/{project_number}/locations/{location}/documents/{document_id}. + /// Format for project: projects/{project_number}. + #[prost(string, tag="1")] + pub resource: ::prost::alloc::string::String, + /// Required. REQUIRED: The complete policy to be applied to the `resource`. The size of + /// the policy is limited to a few 10s of KB. + #[prost(message, optional, tag="2")] + pub policy: ::core::option::Option, + /// The meta information collected about the end user, used to enforce access + /// control for the service. + #[prost(message, optional, tag="3")] + pub request_metadata: ::core::option::Option, + /// For Set Project ACL only. Authorization check for end user will be ignored + /// when project_owner=true. + #[prost(bool, tag="4")] + pub project_owner: bool, +} +/// Represents a set of rules from a single customer. +/// Next id: 9 +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RuleSet { + /// The resource name of the rule set. Managed internally. + /// Format: + /// projects/{project_number}/locations/{location}/ruleSet/{rule_set_id}. + /// + /// The name is ignored when creating a rule set. + #[prost(string, tag="6")] + pub name: ::prost::alloc::string::String, + /// Short description of the rule-set. + #[prost(string, tag="1")] + pub description: ::prost::alloc::string::String, + /// Source of the rules i.e., customer name. + #[prost(string, tag="2")] + pub source: ::prost::alloc::string::String, + /// List of rules given by the customer. + #[prost(message, repeated, tag="3")] + pub rules: ::prost::alloc::vec::Vec, + /// Records the user defined time after which the rule-set will become active. + #[prost(message, optional, tag="4")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// The schedule with which the Ruleset is applied. + /// + /// The presence of this field means that the ruleset is asynchronous. + #[prost(enumeration="Schedule", tag="8")] + pub schedule: i32, + #[prost(oneof="rule_set::Expiration", tags="5, 7")] + pub expiration: ::core::option::Option, +} +/// Nested message and enum types in `RuleSet`. +pub mod rule_set { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Expiration { + /// The timestamp after which RuleSet will not be executed by Policy Engine. + #[prost(message, tag="5")] + ExpireTime(::prost_types::Timestamp), + /// Input only. The TTL (time to live) of the RuleSet. + /// + /// If it is set, \[expire_time][google.cloud.contentwarehouse.v1.RuleSet.expire_time\] is set as current timestamp plus \[ttl][google.cloud.contentwarehouse.v1.RuleSet.ttl\]. + /// The derived \[expire_time][google.cloud.contentwarehouse.v1.RuleSet.expire_time\] is returned in the output and \[ttl][google.cloud.contentwarehouse.v1.RuleSet.ttl\] is left + /// blank when retrieving the \[RuleSet][google.cloud.contentwarehouse.v1.RuleSet\]. + /// + /// If it is set, the RuleSet is not available for execution after current + /// timestamp plus \[ttl][google.cloud.contentwarehouse.v1.RuleSet.ttl\]. However, the RuleSet can still be retrieved by + /// \[RuleSetService.GetRuleSet][google.cloud.contentwarehouse.v1.RuleSetService.GetRuleSet\] and \[RuleSetService.ListRuleSets][google.cloud.contentwarehouse.v1.RuleSetService.ListRuleSets\]. + #[prost(message, tag="7")] + Ttl(::prost_types::Duration), + } +} +/// Represents the rule for a content warehouse trigger. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Rule { + /// Short description of the rule and its context. + #[prost(string, tag="1")] + pub description: ::prost::alloc::string::String, + /// ID of the rule. It has to be unique across all the examples. + /// This is managed internally. + #[prost(string, tag="2")] + pub rule_id: ::prost::alloc::string::String, + /// Identifies the trigger type for running the policy. + #[prost(enumeration="rule::TriggerType", tag="3")] + pub trigger_type: i32, + /// Represents the conditional expression to be evaluated. + /// Expression should evaluate to a boolean result. + /// When the condition is true actions are executed. + /// Example: user_role = "hsbc_role_1" AND doc.salary > 20000 + #[prost(string, tag="4")] + pub condition: ::prost::alloc::string::String, + /// List of actions that are executed when the rule is satisfied. + #[prost(message, repeated, tag="5")] + pub actions: ::prost::alloc::vec::Vec, + /// Priority of the rule for execution sequence preference. + #[prost(float, tag="6")] + pub priority: f32, + /// Indicates if the policy is currently in use or not. + #[prost(bool, tag="7")] + pub enabled: bool, +} +/// Nested message and enum types in `Rule`. +pub mod rule { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum TriggerType { + Unknown = 0, + /// Trigger for create document action. + OnCreate = 1, + /// Trigger for read document action. + OnRead = 2, + /// Trigger for search document action. + OnSearch = 3, + /// Trigger for update document action. + OnUpdate = 4, + /// Trigger for delete document action. + OnDelete = 5, + /// Trigger for asynchronous document actions. + Async = 6, + } + impl TriggerType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TriggerType::Unknown => "UNKNOWN", + TriggerType::OnCreate => "ON_CREATE", + TriggerType::OnRead => "ON_READ", + TriggerType::OnSearch => "ON_SEARCH", + TriggerType::OnUpdate => "ON_UPDATE", + TriggerType::OnDelete => "ON_DELETE", + TriggerType::Async => "ASYNC", + } + } + } +} +/// Represents the action triggered by Rule Engine when the rule is true. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Action { + /// ID of the action. Managed internally. + #[prost(string, tag="1")] + pub action_id: ::prost::alloc::string::String, + #[prost(oneof="action::Action", tags="2, 3, 4, 5, 6, 7, 8, 9, 10")] + pub action: ::core::option::Option, +} +/// Nested message and enum types in `Action`. +pub mod action { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Action { + /// Action triggering access control operations. + #[prost(message, tag="2")] + AccessControl(super::AccessControlAction), + /// Action triggering data validation operations. + #[prost(message, tag="3")] + DataValidation(super::DataValidationAction), + /// Action triggering data update operations. + #[prost(message, tag="4")] + DataUpdate(super::DataUpdateAction), + /// Action triggering create document link operation. + #[prost(message, tag="5")] + AddToFolder(super::AddToFolderAction), + /// Action publish to Pub/Sub operation. + #[prost(message, tag="6")] + PublishToPubSub(super::PublishAction), + /// Action performing context evaluation operation. + #[prost(message, tag="7")] + ContextEvaluationAction(super::ContextEvaluationAction), + /// Action process expired data. + #[prost(message, tag="8")] + ExpiredDataHandlingAction(super::ExpiredDataHandlingAction), + /// Action removing a document from a folder. + #[prost(message, tag="9")] + RemoveFromFolderAction(super::RemoveFromFolderAction), + /// Action deleting the document. + #[prost(message, tag="10")] + DeleteDocumentAction(super::DeleteDocumentAction), + } +} +/// Represents the action responsible for access control list management +/// operations. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AccessControlAction { + /// Identifies the type of operation. + #[prost(enumeration="access_control_action::OperationType", tag="1")] + pub operation_type: i32, + /// Represents the new policy from which bindings are added, removed or + /// replaced based on the type of the operation. the policy is limited to a few + /// 10s of KB. + #[prost(message, optional, tag="2")] + pub policy: ::core::option::Option, +} +/// Nested message and enum types in `AccessControlAction`. +pub mod access_control_action { + /// Type of ACL modification operation. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum OperationType { + Unknown = 0, + /// Adds newly given policy bindings in the existing bindings list. + AddPolicyBinding = 1, + /// Removes newly given policy bindings from the existing bindings list. + RemovePolicyBinding = 2, + /// Replaces existing policy bindings with the given policy binding list + ReplacePolicyBinding = 3, + } + impl OperationType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OperationType::Unknown => "UNKNOWN", + OperationType::AddPolicyBinding => "ADD_POLICY_BINDING", + OperationType::RemovePolicyBinding => "REMOVE_POLICY_BINDING", + OperationType::ReplacePolicyBinding => "REPLACE_POLICY_BINDING", + } + } + } +} +/// Represents the action responsible for data validation operations. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataValidationAction { + /// Map of (K, V) -> (field, string condition to be evaluated on the field) + /// E.g., ("age", "age > 18 && age < 60") entry triggers validation of field + /// age with the given condition. Map entries will be ANDed during validation. + #[prost(map="string, string", tag="1")] + pub conditions: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, +} +/// Represents the action responsible for properties update operations. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataUpdateAction { + /// Map of (K, V) -> (valid name of the field, new value of the field) + /// E.g., ("age", "60") entry triggers update of field age with a value of 60. + /// If the field is not present then new entry is added. + /// During update action execution, value strings will be casted to + /// appropriate types. + #[prost(map="string, string", tag="1")] + pub entries: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, +} +/// Represents the folder schema and corresponding condition. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FolderSchemaCondition { + /// Name of the folder schema consisting of the properties to be evaluated. + /// Format: + /// projects/{project_number}/locations/{location}/documentSchemas/{document_id}. + #[prost(string, tag="1")] + pub folder_schema: ::prost::alloc::string::String, + /// The filter condition. + /// The syntax for this expression is a subset of SQL syntax. + /// + /// Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the left + /// of the operator is a property name and the right of the operator is a + /// number or a quoted string. You must escape backslash (\\) and quote (\") + /// characters. Supported functions are `LOWER(\[property_name\])` to perform a + /// case insensitive match and `EMPTY(\[property_name\])` to filter on the + /// existence of a key. + /// + /// Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting + /// (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + /// comparisons or functions are allowed in the expression. The expression must + /// be < 6000 bytes in length. + /// Example: "DOC.SSN = FOLDER.ssn" + /// In the above example, SSN property from the document under + /// process is evaluated against folders' ssn property. + /// The document under process will be added under the folder if the condition + /// is evaluated as true. + /// Note: FOLDER prefix is used to refer to target folder's properties. + /// DOC prefix is used to refer to properties in the under process document. + #[prost(string, tag="2")] + pub condition: ::prost::alloc::string::String, +} +/// Represents the action responsible for adding document under a folder. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddToFolderAction { + /// Names of the folder under which new document is to be added. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{document_id}. + #[prost(string, repeated, tag="1")] + pub folders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// If the folders info is not available then populate FolderSchemaConditions + /// for finding matching folders dynamically. + /// Filter conditions used to derive specific folders dynamically. + #[prost(message, repeated, tag="2")] + pub folder_schema_conditions: ::prost::alloc::vec::Vec, +} +/// Represents the action responsible for remove a document from a specific +/// folder. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveFromFolderAction { + /// Condition of the action to be executed. + #[prost(string, tag="1")] + pub condition: ::prost::alloc::string::String, + /// Name of the folder under which new document is to be added. + /// Format: + /// projects/{project_number}/locations/{location}/documents/{document_id}. + #[prost(string, tag="2")] + pub folder: ::prost::alloc::string::String, +} +/// Represents the action responsible for publishing messages to a Pub/Sub topic. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PublishAction { + /// The topic id in the Pub/Sub service for which messages will be published + /// to. + #[prost(string, tag="1")] + pub topic_id: ::prost::alloc::string::String, + /// Messages to be published. + #[prost(string, repeated, tag="2")] + pub messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Represents the action responsible for performing context evaluation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ContextEvaluationAction { + /// Filter condition for the documents to be included in the evaluation. + #[prost(string, tag="1")] + pub condition: ::prost::alloc::string::String, + /// Name of the variables input for the context evaluation. + #[prost(string, repeated, tag="2")] + pub variable_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Optional. cloud Pub/Sub topic-id. If specified, information of the + /// updated documents will be published to this topic. + #[prost(string, tag="5")] + pub topic_id: ::prost::alloc::string::String, + #[prost(oneof="context_evaluation_action::ContextEvaluationMethod", tags="4, 6, 7")] + pub context_evaluation_method: ::core::option::Option, +} +/// Nested message and enum types in `ContextEvaluationAction`. +pub mod context_evaluation_action { + /// User Cloud Function for context evaluation. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct CloudFunctionInfo { + /// Url of the Cloud Function. The Cloud Function needs to live inside + /// consumer project. + #[prost(string, tag="3")] + pub cloud_function: ::prost::alloc::string::String, + } + /// Settings of user's webhook. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Webhook { + /// URL string for receiving a POST request every time webhook is triggered. + #[prost(string, tag="8")] + pub uri: ::prost::alloc::string::String, + } + /// Settings of service directory for webhook under VPCSC. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct WebhookWithServiceDirectory { + /// The service directory service resource name. + #[prost(string, tag="9")] + pub service: ::prost::alloc::string::String, + /// Detailed webhook settings. + #[prost(message, optional, tag="10")] + pub webhook: ::core::option::Option, + } + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum ContextEvaluationMethod { + /// User Cloud Function for the context evaluation. + #[prost(message, tag="4")] + CloudFunctionInfo(CloudFunctionInfo), + /// User's webhook address for the context evaluation. + #[prost(message, tag="6")] + Webhook(Webhook), + /// User's webhook address integrated with service-directory. + #[prost(message, tag="7")] + WebhookWithServiceDirectory(WebhookWithServiceDirectory), + } +} +/// Represents the action responsible for handling expired data. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExpiredDataHandlingAction { + /// Filter condition for the documents to be included in the evaluation. + #[prost(string, tag="1")] + pub condition: ::prost::alloc::string::String, + /// Expired data handling will publish errors to the Pub/Sub using topic-id + /// provided. + #[prost(string, tag="2")] + pub topic_id: ::prost::alloc::string::String, +} +/// Represents the action responsible for deleting the document. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteDocumentAction { + /// Boolean field to select between hard vs soft delete options. + /// Set 'true' for 'hard delete' and 'false' for 'soft delete'. + #[prost(bool, tag="1")] + pub enable_hard_delete: bool, +} +/// Records the output of Rule Engine including rule evaluation and actions +/// result. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RuleEngineOutput { + /// Name of the document against which the rules and actions were evaluated. + #[prost(string, tag="3")] + pub document_name: ::prost::alloc::string::String, + /// Output from Rule Evaluator containing matched, unmatched and invalid rules. + #[prost(message, optional, tag="1")] + pub rule_evaluator_output: ::core::option::Option, + /// Output from Action Executor containing rule and corresponding actions + /// execution result. + #[prost(message, optional, tag="2")] + pub action_executor_output: ::core::option::Option, +} +/// Represents the output of the Rule Evaluator. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RuleEvaluatorOutput { + /// List of rules fetched from database for the given request trigger type. + #[prost(message, repeated, tag="1")] + pub triggered_rules: ::prost::alloc::vec::Vec, + /// A subset of triggered rules that are evaluated true for a given request. + #[prost(message, repeated, tag="2")] + pub matched_rules: ::prost::alloc::vec::Vec, + /// A subset of triggered rules that failed the validation check(s) after + /// parsing. + #[prost(message, repeated, tag="3")] + pub invalid_rules: ::prost::alloc::vec::Vec, +} +/// A triggered rule that failed the validation check(s) after parsing. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InvalidRule { + /// Triggered rule. + #[prost(message, optional, tag="1")] + pub rule: ::core::option::Option, + /// Validation error on a parsed expression. + #[prost(string, tag="2")] + pub error: ::prost::alloc::string::String, +} +/// Represents the output of the Action Executor. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActionExecutorOutput { + /// List of rule and corresponding actions result. + #[prost(message, repeated, tag="1")] + pub rule_actions_pairs: ::prost::alloc::vec::Vec, +} +/// Represents a rule and outputs of associated actions. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RuleActionsPair { + /// Represents the rule. + #[prost(message, optional, tag="1")] + pub rule: ::core::option::Option, + /// Outputs of executing the actions associated with the above rule. + #[prost(message, repeated, tag="2")] + pub action_outputs: ::prost::alloc::vec::Vec, +} +/// Represents the result of executing an action. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActionOutput { + /// ID of the action. + #[prost(string, tag="1")] + pub action_id: ::prost::alloc::string::String, + /// State of an action. + #[prost(enumeration="action_output::State", tag="2")] + pub action_state: i32, + /// Action execution output message. + #[prost(string, tag="3")] + pub output_message: ::prost::alloc::string::String, +} +/// Nested message and enum types in `ActionOutput`. +pub mod action_output { + /// Represents execution state of the action. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum State { + Unknown = 0, + /// State indicating action executed successfully. + ActionSucceeded = 1, + /// State indicating action failed. + ActionFailed = 2, + /// State indicating action timed out. + ActionTimedOut = 3, + /// State indicating action is pending. + ActionPending = 4, + } + impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::Unknown => "UNKNOWN", + State::ActionSucceeded => "ACTION_SUCCEEDED", + State::ActionFailed => "ACTION_FAILED", + State::ActionTimedOut => "ACTION_TIMED_OUT", + State::ActionPending => "ACTION_PENDING", + } + } + } +} +/// Represents the schedule with which asynchronous RuleSets are applied. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Schedule { + /// Unspecified schedule. + Unspecified = 0, + /// Policy should be applied every calendar day at 00:00 PST. + Daily = 1, + /// Policy should be applied every Sunday at 00:00 PST. + Weekly = 2, + /// Policy should be applied the 1st of every calendar month at 00:00 PST. + Monthly = 3, +} +impl Schedule { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Schedule::Unspecified => "SCHEDULE_UNSPECIFIED", + Schedule::Daily => "SCHEDULE_DAILY", + Schedule::Weekly => "SCHEDULE_WEEKLY", + Schedule::Monthly => "SCHEDULE_MONTHLY", + } + } +} +/// Response message for DocumentService.CreateDocument. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateDocumentResponse { + /// Document created after executing create request. + #[prost(message, optional, tag="1")] + pub document: ::core::option::Option, + /// Output from Rule Engine recording the rule evaluator and action executor's + /// output. + /// + /// Refer format in: google/cloud/contentwarehouse/v1/rule_engine.proto + #[prost(message, optional, tag="2")] + pub rule_engine_output: ::core::option::Option, + /// Additional information for the API invocation, such as the request tracking + /// id. + #[prost(message, optional, tag="3")] + pub metadata: ::core::option::Option, +} +/// Response message for DocumentService.UpdateDocument. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateDocumentResponse { + /// Updated document after executing update request. + #[prost(message, optional, tag="1")] + pub document: ::core::option::Option, + /// Output from Rule Engine recording the rule evaluator and action executor's + /// output. + /// + /// Refer format in: google/cloud/contentwarehouse/v1/rule_engine.proto + #[prost(message, optional, tag="2")] + pub rule_engine_output: ::core::option::Option, + /// Additional information for the API invocation, such as the request tracking + /// id. + #[prost(message, optional, tag="3")] + pub metadata: ::core::option::Option, +} +/// Additional result info for the question-answering feature. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QaResult { + /// Highlighted sections in the snippet. + #[prost(message, repeated, tag="1")] + pub highlights: ::prost::alloc::vec::Vec, + /// The calibrated confidence score for this document, in the range + /// [0., 1.]. This represents the confidence level for whether the returned + /// document and snippet answers the user's query. + #[prost(float, tag="2")] + pub confidence_score: f32, +} +/// Nested message and enum types in `QAResult`. +pub mod qa_result { + /// A text span in the search text snippet that represents a highlighted + /// section (answer context, highly relevant sentence, etc.). + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Highlight { + /// Start index of the highlight. + #[prost(int32, tag="1")] + pub start_index: i32, + /// End index of the highlight, exclusive. + #[prost(int32, tag="2")] + pub end_index: i32, + } +} +/// Response message for DocumentService.SearchDocuments. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchDocumentsResponse { + /// The document entities that match the specified \[SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest\]. + #[prost(message, repeated, tag="1")] + pub matching_documents: ::prost::alloc::vec::Vec, + /// The token that specifies the starting position of the next page of results. + /// This field is empty if there are no more results. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, + /// The total number of matched documents which is available only if the client + /// set \[SearchDocumentsRequest.require_total_size][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.require_total_size\] to `true`. Otherwise, the + /// value will be `-1`. + #[prost(int32, tag="3")] + pub total_size: i32, + /// Additional information for the API invocation, such as the request tracking + /// id. + #[prost(message, optional, tag="4")] + pub metadata: ::core::option::Option, + /// The histogram results that match with the specified + /// \[SearchDocumentsRequest.histogram_queries][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.histogram_queries\]. + #[prost(message, repeated, tag="6")] + pub histogram_query_results: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `SearchDocumentsResponse`. +pub mod search_documents_response { + /// Document entry with metadata inside \[SearchDocumentsResponse][google.cloud.contentwarehouse.v1.SearchDocumentsResponse\] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct MatchingDocument { + /// Document that matches the specified \[SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest\]. + /// This document only contains indexed metadata information. + #[prost(message, optional, tag="1")] + pub document: ::core::option::Option, + /// Contains snippets of text from the document full raw text that most + /// closely match a search query's keywords, if available. All HTML tags in + /// the original fields are stripped when returned in this field, and + /// matching query keywords are enclosed in HTML bold tags. + /// + /// If the question-answering feature is enabled, this field will instead + /// contain a snippet that answers the user's natural-language query. No HTML + /// bold tags will be present, and highlights in the answer snippet can be + /// found in \[QAResult.highlights][google.cloud.contentwarehouse.v1.QAResult.highlights\]. + #[prost(string, tag="2")] + pub search_text_snippet: ::prost::alloc::string::String, + /// Experimental. + /// Additional result info if the question-answering feature is enabled. + #[prost(message, optional, tag="3")] + pub qa_result: ::core::option::Option, + } +} +/// Response message for DocumentService.FetchAcl. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchAclResponse { + /// The IAM policy. + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// Additional information for the API invocation, such as the request tracking + /// id. + #[prost(message, optional, tag="2")] + pub metadata: ::core::option::Option, +} +/// Response message for DocumentService.SetAcl. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetAclResponse { + /// The policy will be attached to a resource (e.g. projecct, document). + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// Additional information for the API invocation, such as the request tracking + /// id. + #[prost(message, optional, tag="2")] + pub metadata: ::core::option::Option, +} +/// Generated client implementations. +pub mod document_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct DocumentServiceClient { + inner: tonic::client::Grpc, + } + impl DocumentServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl DocumentServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> DocumentServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + DocumentServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Creates a document. + pub async fn create_document( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentService/CreateDocument", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Gets a document. Returns NOT_FOUND if the document does not exist. + pub async fn get_document( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentService/GetDocument", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Updates a document. Returns INVALID_ARGUMENT if the name of the document + /// is non-empty and does not equal the existing name. + pub async fn update_document( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentService/UpdateDocument", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Deletes a document. Returns NOT_FOUND if the document does not exist. + pub async fn delete_document( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentService/DeleteDocument", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Searches for documents using provided [SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest]. + /// This call only returns documents that the caller has permission to search + /// against. + pub async fn search_documents( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentService/SearchDocuments", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Gets the access control policy for a resource. Returns NOT_FOUND error if + /// the resource does not exist. Returns an empty policy if the resource exists + /// but does not have a policy set. + pub async fn fetch_acl( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentService/FetchAcl", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Sets the access control policy for a resource. Replaces any existing + /// policy. + pub async fn set_acl( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.DocumentService/SetAcl", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// Request message for RuleSetService.CreateRuleSet. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateRuleSetRequest { + /// Required. The parent name. + /// Format: projects/{project_number}/locations/{location}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// Required. The rule set to create. + #[prost(message, optional, tag="2")] + pub rule_set: ::core::option::Option, +} +/// Request message for RuleSetService.GetRuleSet. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRuleSetRequest { + /// Required. The name of the rule set to retrieve. + /// Format: + /// projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Request message for RuleSetService.UpdateRuleSet. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateRuleSetRequest { + /// Required. The name of the rule set to update. + /// Format: + /// projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Required. The rule set to update. + #[prost(message, optional, tag="2")] + pub rule_set: ::core::option::Option, +} +/// Request message for RuleSetService.DeleteRuleSet. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteRuleSetRequest { + /// Required. The name of the rule set to delete. + /// Format: + /// projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Request message for RuleSetService.ListRuleSets. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRuleSetsRequest { + /// Required. The parent, which owns this collection of document. + /// Format: projects/{project_number}/locations/{location}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of rule sets to return. The service may return + /// fewer than this value. + /// If unspecified, at most 50 rule sets will be returned. + /// The maximum value is 1000; values above 1000 will be coerced to 1000. + #[prost(int32, tag="2")] + pub page_size: i32, + /// A page token, received from a previous `ListRuleSets` call. + /// Provide this to retrieve the subsequent page. + /// + /// When paginating, all other parameters provided to `ListRuleSets` + /// must match the call that provided the page token. + #[prost(string, tag="3")] + pub page_token: ::prost::alloc::string::String, +} +/// Response message for RuleSetService.ListRuleSets. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRuleSetsResponse { + /// The rule sets from the specified parent. + #[prost(message, repeated, tag="1")] + pub rule_sets: ::prost::alloc::vec::Vec, + /// A token, which can be sent as `page_token` to retrieve the next page. + /// If this field is omitted, there are no subsequent pages. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Request message for RuleSetService.ProcessAsyncRuleSets. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProcessAsyncRuleSetsRequest { + /// Required. The Location under which all async rules are stored. + #[prost(string, tag="1")] + pub location: ::prost::alloc::string::String, + /// Required. The frequency category of async rules to process. + #[prost(enumeration="Schedule", tag="2")] + pub schedule: i32, + /// Optional. Timestamp to override inferred execution time. + #[prost(message, optional, tag="3")] + pub execution_time: ::core::option::Option<::prost_types::Timestamp>, + /// Optional. Document name filter to process only a subset of Documents. + #[prost(string, repeated, tag="4")] + pub document_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Response message for RuleSetService.ProcessAsyncRuleSets. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProcessAsyncRuleSetsResponse { + /// True if the processing of asynchronous policies was entirely + /// successful. + #[prost(bool, tag="1")] + pub success: bool, + /// Contains the errors encountered during the processing of asynchronous + /// policies. + #[prost(message, repeated, tag="2")] + pub errors: ::prost::alloc::vec::Vec, +} +/// Generated client implementations. +pub mod rule_set_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct RuleSetServiceClient { + inner: tonic::client::Grpc, + } + impl RuleSetServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl RuleSetServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> RuleSetServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + RuleSetServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Creates a ruleset. + pub async fn create_rule_set( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.RuleSetService/CreateRuleSet", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Gets a ruleset. Returns NOT_FOUND if the ruleset does not exist. + pub async fn get_rule_set( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.RuleSetService/GetRuleSet", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Updates a ruleset. Returns INVALID_ARGUMENT if the name of the ruleset + /// is non-empty and does not equal the existing name. + pub async fn update_rule_set( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.RuleSetService/UpdateRuleSet", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Deletes a ruleset. Returns NOT_FOUND if the document does not exist. + pub async fn delete_rule_set( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.RuleSetService/DeleteRuleSet", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Lists rulesets. + pub async fn list_rule_sets( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.RuleSetService/ListRuleSets", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Runs asynchronous RuleSets. + pub async fn process_async_rule_sets( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.RuleSetService/ProcessAsyncRuleSets", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// Represents a list of synonyms for a given context. +/// For example a context "sales" could contain: +/// Synonym 1: sale, invoice, bill, order +/// Synonym 2: money, credit, finance, payment +/// Synonym 3: shipping, freight, transport +/// Each SynonymSets should be disjoint +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SynonymSet { + /// The resource name of the SynonymSet + /// This is mandatory for google.api.resource. + /// Format: + /// projects/{project_number}/locations/{location}/synonymSets/{context}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// This is a freeform field. Example contexts can be "sales," "engineering," + /// "real estate," "accounting," etc. + /// The context can be supplied during search requests. + #[prost(string, tag="2")] + pub context: ::prost::alloc::string::String, + /// List of Synonyms for the context. + #[prost(message, repeated, tag="3")] + pub synonyms: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `SynonymSet`. +pub mod synonym_set { + /// Represents a list of words given by the customer + /// All these words are synonyms of each other. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Synonym { + /// For example: sale, invoice, bill, order + #[prost(string, repeated, tag="1")] + pub words: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } +} +/// Request message for SynonymSetService.CreateSynonymSet. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSynonymSetRequest { + /// Required. The parent name. + /// Format: projects/{project_number}/locations/{location}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// Required. The synonymSet to be created for a context + #[prost(message, optional, tag="2")] + pub synonym_set: ::core::option::Option, +} +/// Request message for SynonymSetService.GetSynonymSet. +/// Will return synonymSet for a certain context. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSynonymSetRequest { + /// Required. The name of the synonymSet to retrieve + /// Format: + /// projects/{project_number}/locations/{location}/synonymSets/{context}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Request message for SynonymSetService.ListSynonymSets. +/// Will return all synonymSets belonging to the customer project. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSynonymSetsRequest { + /// Required. The parent name. + /// Format: projects/{project_number}/locations/{location}. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The maximum number of synonymSets to return. The service may return + /// fewer than this value. + /// If unspecified, at most 50 rule sets will be returned. + /// The maximum value is 1000; values above 1000 will be coerced to 1000. + #[prost(int32, tag="2")] + pub page_size: i32, + /// A page token, received from a previous `ListSynonymSets` call. + /// Provide this to retrieve the subsequent page. + /// + /// When paginating, all other parameters provided to `ListSynonymSets` + /// must match the call that provided the page token. + #[prost(string, tag="3")] + pub page_token: ::prost::alloc::string::String, +} +/// Response message for SynonymSetService.ListSynonymSets. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSynonymSetsResponse { + /// The synonymSets from the specified parent. + #[prost(message, repeated, tag="1")] + pub synonym_sets: ::prost::alloc::vec::Vec, + /// A page token, received from a previous `ListSynonymSets` call. + /// Provide this to retrieve the subsequent page. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// Request message for SynonymSetService.UpdateSynonymSet. +/// Removes the SynonymSet for the specified context and replaces +/// it with the SynonymSet in this request. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSynonymSetRequest { + /// Required. The name of the synonymSet to update + /// Format: + /// projects/{project_number}/locations/{location}/synonymSets/{context}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Required. The synonymSet to be updated for the customer + #[prost(message, optional, tag="2")] + pub synonym_set: ::core::option::Option, +} +/// Request message for SynonymSetService.DeleteSynonymSet. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSynonymSetRequest { + /// Required. The name of the synonymSet to delete + /// Format: + /// projects/{project_number}/locations/{location}/synonymSets/{context}. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// Generated client implementations. +pub mod synonym_set_service_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// A Service that manage/custom customer specified SynonymSets. + #[derive(Debug, Clone)] + pub struct SynonymSetServiceClient { + inner: tonic::client::Grpc, + } + impl SynonymSetServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl SynonymSetServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> SynonymSetServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + SynonymSetServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Creates a SynonymSet for a single context. + /// Throws an ALREADY_EXISTS exception if a synonymset already exists + /// for the context. + pub async fn create_synonym_set( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.SynonymSetService/CreateSynonymSet", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Gets a SynonymSet for a particular context. + /// Throws a NOT_FOUND exception if the Synonymset + /// does not exist + pub async fn get_synonym_set( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.SynonymSetService/GetSynonymSet", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Remove the existing SynonymSet for the context and replaces it + /// with a new one. + /// Throws a NOT_FOUND exception if the SynonymSet is not found. + pub async fn update_synonym_set( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.SynonymSetService/UpdateSynonymSet", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Deletes a SynonymSet for a given context. + /// Throws a NOT_FOUND exception if the SynonymSet is not found. + pub async fn delete_synonym_set( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.SynonymSetService/DeleteSynonymSet", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Returns all SynonymSets (for all contexts) for the specified location. + pub async fn list_synonym_sets( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.cloud.contentwarehouse.v1.SynonymSetService/ListSynonymSets", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} diff --git a/gcloud-sdk/genproto/google.cloud.healthcare.logging.rs b/gcloud-sdk/genproto/google.cloud.healthcare.logging.rs new file mode 100644 index 000000000..a16a35641 --- /dev/null +++ b/gcloud-sdk/genproto/google.cloud.healthcare.logging.rs @@ -0,0 +1,231 @@ +/// A log entry for an Annotation import long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportAnnotationLogEntry { + /// The source in Cloud Storage. For example, + /// `gs://{bucket_id}/{path/to/file}`. + #[prost(string, tag="1")] + pub source: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="2")] + pub error: ::core::option::Option, +} +/// A log entry for an Annotation export long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportAnnotationLogEntry { + /// The destination in Cloud Storage or BigQuery. + #[prost(string, tag="1")] + pub destination: ::prost::alloc::string::String, + /// The annotation record being exported. For example: + /// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{store_id}/annotations/{annotation_id}`. + #[prost(string, tag="2")] + pub annotation_name: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="3")] + pub error: ::core::option::Option, +} +/// A log entry for an Annotation evaluate long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvaluateAnnotationLogEntry { + /// The report destination in BigQuery. + #[prost(string, tag="1")] + pub destination: ::prost::alloc::string::String, + /// The eval annotation record being evaluated. For example: + /// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{eval_store_id}/annotations/{eval_annotation_id}`. + #[prost(string, tag="2")] + pub eval_annotation_name: ::prost::alloc::string::String, + /// The golden annotation record being evaluated. For example: + /// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{golden_store_id}/annotations/{golden_annotation_id}`. + #[prost(string, tag="3")] + pub golden_annotation_name: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="4")] + pub error: ::core::option::Option, +} +/// A log entry for a Consent store QueryAccessibleData long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAccessibleDataLogEntry { + /// The resource being processed. + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="2")] + pub error: ::core::option::Option, +} +/// A log entry for a User Data Mapping indexing notification. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsentUserDataMappingLogEntry { + /// The User Data Mapping being indexed (for example, + /// `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{storeId}/userDataMappings/{messageId}`). + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="2")] + pub error: ::core::option::Option, +} +/// A log entry for a de-identification long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeidentifyLogEntry { + /// The resource being de-identified. + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="2")] + pub error: ::core::option::Option, +} +/// A log entry for a DICOM import long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDicomLogEntry { + /// The source file, in the format `gs://{bucket-id}/{path/to/file}`. + #[prost(string, tag="1")] + pub source: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="2")] + pub error: ::core::option::Option, +} +/// A log entry for a DICOM export long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportDicomLogEntry { + /// The DICOM resource being exported. + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="2")] + pub error: ::core::option::Option, +} +/// A log entry for a DICOM store Pub/Sub notification. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DicomNotificationLogEntry { + /// The DICOM resource being created. + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The Pub/Sub topic that the notification is published on. + #[prost(string, tag="2")] + pub pubsub_topic: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="3")] + pub error: ::core::option::Option, +} +/// A log entry for a DICOM streaming export notification. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DicomStreamLogEntry { + /// The DICOM resource being exported. + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The destination in BigQuery, in the format + /// `bq://{projectId}.{bqDatasetId}.{bqTableId}`. + #[prost(string, tag="2")] + pub destination: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="3")] + pub error: ::core::option::Option, +} +/// A log entry for a FHIR import long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportFhirLogEntry { + /// The source in Cloud Storage (for example, + /// `gs://{bucket_id}/{path/to/file}`) or BigQuery (for example, + /// `bq://{projectId}.{bqDatasetId}`). + #[prost(string, tag="1")] + pub source: ::prost::alloc::string::String, + /// The ID in the source file of the FHIR resource being imported. + #[prost(string, tag="2")] + pub resource_id: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="3")] + pub error: ::core::option::Option, +} +/// A log entry for a FHIR export long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportFhirLogEntry { + /// The destination in Cloud Storage (for example, + /// `gs://{bucket_id}/{path/to/file}`) or BigQuery (for example, + /// `bq://{projectId}.{bqDatasetId}`). + #[prost(string, tag="1")] + pub destination: ::prost::alloc::string::String, + /// The resource being exported (e.g. + /// `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhirStoreId}/fhir/Patient/{patientId}`). + #[prost(string, tag="3")] + pub resource_name: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="4")] + pub error: ::core::option::Option, +} +/// A log entry for a FHIR configure search long-running operation +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FhirConfigureSearchLogEntry { + /// The ID of the resource being reindexed. + #[prost(string, tag="1")] + pub resource_id: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="2")] + pub error: ::core::option::Option, +} +/// A log entry for a FHIR store Pub/Sub notification. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FhirNotificationLogEntry { + /// The resource being changed (for example, + /// `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhirStoreId}/fhir/Patient/{patientId}`). + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The Pub/Sub topic that the notification is published on. + #[prost(string, tag="2")] + pub pubsub_topic: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="3")] + pub error: ::core::option::Option, +} +/// A log entry for a FHIR streaming export notification. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FhirStreamLogEntry { + /// The resource being changed (for example, + /// `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhirStoreId}/fhir/Patient/{patientId}`). + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The destination in BigQuery (for example, + /// `bq://{projectId}.{bqDatasetId}.{bqTableId}`). + #[prost(string, tag="2")] + pub destination: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="3")] + pub error: ::core::option::Option, +} +/// A log entry for a FHIR streaming deidentification notification. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FhirDeidentifyStreamToStoreLogEntry { + /// The resource that changed (for example, + /// `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhirStoreId}/fhir/Patient/{patientId}`). + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The destination FHIR store name. (for example, + /// `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhirStoreId}`). + #[prost(string, tag="2")] + pub destination: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="3")] + pub error: ::core::option::Option, +} +/// A log entry for a HL7v2 import long-running operation. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportHl7V2LogEntry { + /// The source in Cloud Storage (for example, + /// `gs://{bucket_id}/{path/to/file}`). + #[prost(string, tag="1")] + pub source: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="2")] + pub error: ::core::option::Option, +} +/// A log entry for a HL7v2 store Pub/Sub notification. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Hl7V2NotificationLogEntry { + /// The HL7v2 message being created (for example, + /// `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/hl7V2Stores/{hl7v2StoreId}/messages/{hl7v2MessageId}`). + #[prost(string, tag="1")] + pub resource_name: ::prost::alloc::string::String, + /// The Pub/Sub topic that the notification is published on. + #[prost(string, tag="2")] + pub pubsub_topic: ::prost::alloc::string::String, + /// The error code and message. + #[prost(message, optional, tag="3")] + pub error: ::core::option::Option, +} diff --git a/gcloud-sdk/genproto/google.cloud.ids.logging.v1.rs b/gcloud-sdk/genproto/google.cloud.ids.logging.v1.rs new file mode 100644 index 000000000..cd9fba7d2 --- /dev/null +++ b/gcloud-sdk/genproto/google.cloud.ids.logging.v1.rs @@ -0,0 +1,162 @@ +/// A threat detected by Cloud IDS. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ThreatLog { + /// Name of the threat, e,g. "Suspicious HTTP Evasion" + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Unique ID of the threat. + #[prost(string, tag="13")] + pub threat_id: ::prost::alloc::string::String, + /// The time of the alert. + #[prost(message, optional, tag="2")] + pub alert_time: ::core::option::Option<::prost_types::Timestamp>, + /// Severity of threat. + #[prost(enumeration="threat_log::Severity", tag="19")] + pub alert_severity: i32, + /// The type of the threat, e.g. "Spyware". + #[prost(string, tag="4")] + pub r#type: ::prost::alloc::string::String, + /// Category (sub-type) of the threat, e.g. "code-execution". + #[prost(string, tag="18")] + pub category: ::prost::alloc::string::String, + /// The source IP Address of the packet, e.g. "35.191.8.79" + #[prost(string, tag="5")] + pub source_ip_address: ::prost::alloc::string::String, + /// The source port of the packet, e.g. 8080 + #[prost(int32, tag="6")] + pub source_port: i32, + /// The destination IP Address of the packet, e.g. "192.168.100.2" + #[prost(string, tag="7")] + pub destination_ip_address: ::prost::alloc::string::String, + /// The destination port of the packet, e.g. 100 + #[prost(int32, tag="8")] + pub destination_port: i32, + /// The IP protocol of the packet, e.g. "TCP". + #[prost(string, tag="9")] + pub ip_protocol: ::prost::alloc::string::String, + /// The direction of the packet - an optional field. + #[prost(enumeration="threat_log::Direction", tag="10")] + pub direction: i32, + /// ID of the Layer 4 session of the threat. + #[prost(string, tag="14")] + pub session_id: ::prost::alloc::string::String, + /// Number of sessions with same source IP, destination IP, application, and + /// type seen within 5 seconds. + #[prost(string, tag="15")] + pub repeat_count: ::prost::alloc::string::String, + /// Application associated with the session. + #[prost(string, tag="16")] + pub application: ::prost::alloc::string::String, + /// Variable field. URI or filename of the relevant threat, if applicable. + #[prost(string, tag="17")] + pub uri_or_filename: ::prost::alloc::string::String, + /// CVE IDs of the threat. + #[prost(string, repeated, tag="20")] + pub cves: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Details of the threat reported by the IDS VM + #[prost(string, tag="11")] + pub details: ::prost::alloc::string::String, + /// The network associated with the IDS Endpoint. + #[prost(string, tag="12")] + pub network: ::prost::alloc::string::String, +} +/// Nested message and enum types in `ThreatLog`. +pub mod threat_log { + /// Describes the type of severity of the threat. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Severity { + /// Default value - should never be used. + Unspecified = 0, + Low = 2, + Medium = 3, + High = 4, + Critical = 5, + Informational = 6, + } + impl Severity { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Severity::Unspecified => "SEVERITY_UNSPECIFIED", + Severity::Low => "LOW", + Severity::Medium => "MEDIUM", + Severity::High => "HIGH", + Severity::Critical => "CRITICAL", + Severity::Informational => "INFORMATIONAL", + } + } + } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Direction { + /// Default value - permitted since Direction is optional. + Undefined = 0, + /// Ingress traffic. + ClientToServer = 1, + /// Egress traffic. + ServerToClient = 2, + } + impl Direction { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Direction::Undefined => "DIRECTION_UNDEFINED", + Direction::ClientToServer => "CLIENT_TO_SERVER", + Direction::ServerToClient => "SERVER_TO_CLIENT", + } + } + } +} +/// Traffic detected by Cloud IDS. +/// Fields taken from: +/// +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TrafficLog { + /// Time of session start. + #[prost(message, optional, tag="1")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// Elapsed time of the session. + #[prost(message, optional, tag="2")] + pub elapsed_time: ::core::option::Option<::prost_types::Duration>, + /// The network associated with the IDS Endpoint. + #[prost(string, tag="3")] + pub network: ::prost::alloc::string::String, + /// The source IP Address of the packet, e.g. "35.191.8.79" + #[prost(string, tag="4")] + pub source_ip_address: ::prost::alloc::string::String, + /// The source port of the packet, e.g. 8080 + #[prost(int32, tag="5")] + pub source_port: i32, + /// The destination IP Address of the packet, e.g. "192.168.100.2" + #[prost(string, tag="6")] + pub destination_ip_address: ::prost::alloc::string::String, + /// The destination port of the packet, e.g. 100 + #[prost(int32, tag="7")] + pub destination_port: i32, + /// The IP protocol of the packet, e.g. "TCP". + #[prost(string, tag="8")] + pub ip_protocol: ::prost::alloc::string::String, + /// Application associated with the session. + #[prost(string, tag="9")] + pub application: ::prost::alloc::string::String, + /// The direction of the packet. + #[prost(string, tag="12")] + pub session_id: ::prost::alloc::string::String, + /// Number of sessions with same source IP, destination IP, application, and + /// type seen within 5 seconds. + #[prost(string, tag="13")] + pub repeat_count: ::prost::alloc::string::String, + /// Total number of bytes transferred in the session. + #[prost(int64, tag="14")] + pub total_bytes: i64, + /// Total number of packets transferred in the session. + #[prost(int64, tag="15")] + pub total_packets: i64, +} diff --git a/gcloud-sdk/genproto/google.cloud.securitycenter.v1.rs b/gcloud-sdk/genproto/google.cloud.securitycenter.v1.rs index a888a4ada..f3a36656e 100644 --- a/gcloud-sdk/genproto/google.cloud.securitycenter.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.securitycenter.v1.rs @@ -1457,8 +1457,8 @@ pub struct Finding { /// Output only. The most recent time this finding was muted or unmuted. #[prost(message, optional, tag="21")] pub mute_update_time: ::core::option::Option<::prost_types::Timestamp>, - /// Output only. Third party SIEM/SOAR fields within SCC, contains external - /// system information and external system finding fields. + /// Output only. Third party SIEM/SOAR fields within SCC, contains external system + /// information and external system finding fields. #[prost(map="string, message", tag="22")] pub external_systems: ::std::collections::HashMap<::prost::alloc::string::String, ExternalSystem>, /// MITRE ATT&CK tactics and techniques related to this finding. @@ -1481,9 +1481,9 @@ pub struct Finding { /// Represents operating system processes associated with the Finding. #[prost(message, repeated, tag="30")] pub processes: ::prost::alloc::vec::Vec, - /// Output only. Map containing the point of contacts for the given finding. - /// The key represents the type of contact, while the value contains a list of - /// all the contacts that pertain. Please refer to: + /// Output only. Map containing the points of contact for the given finding. The key + /// represents the type of contact, while the value contains a list of all the + /// contacts that pertain. Please refer to: /// /// /// { @@ -1504,6 +1504,10 @@ pub struct Finding { /// finding. #[prost(message, repeated, tag="34")] pub compliances: ::prost::alloc::vec::Vec, + /// Output only. The human readable display name of the finding source such as + /// "Event Threat Detection" or "Security Health Analytics". + #[prost(string, tag="36")] + pub parent_display_name: ::prost::alloc::string::String, /// Contains more detail about the finding. #[prost(string, tag="37")] pub description: ::prost::alloc::string::String, diff --git a/gcloud-sdk/genproto/google.cloud.tpu.v2alpha1.rs b/gcloud-sdk/genproto/google.cloud.tpu.v2alpha1.rs index d10af4170..07b82c6a9 100644 --- a/gcloud-sdk/genproto/google.cloud.tpu.v2alpha1.rs +++ b/gcloud-sdk/genproto/google.cloud.tpu.v2alpha1.rs @@ -209,6 +209,9 @@ pub struct Node { /// Output only. The Symptoms that have occurred to the TPU Node. #[prost(message, repeated, tag="39")] pub symptoms: ::prost::alloc::vec::Vec, + /// Shielded Instance options. + #[prost(message, optional, tag="45")] + pub shielded_instance_config: ::core::option::Option, } /// Nested message and enum types in `Node`. pub mod node { @@ -650,6 +653,13 @@ pub struct GetGuestAttributesResponse { #[prost(message, repeated, tag="1")] pub guest_attributes: ::prost::alloc::vec::Vec, } +/// A set of Shielded Instance options. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ShieldedInstanceConfig { + /// Defines whether the instance has Secure Boot enabled. + #[prost(bool, tag="1")] + pub enable_secure_boot: bool, +} /// Generated client implementations. pub mod tpu_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] diff --git a/gcloud-sdk/genproto/google.cloud.vision.v1.rs b/gcloud-sdk/genproto/google.cloud.vision.v1.rs index a92f59df4..f210b37a0 100644 --- a/gcloud-sdk/genproto/google.cloud.vision.v1.rs +++ b/gcloud-sdk/genproto/google.cloud.vision.v1.rs @@ -1748,7 +1748,8 @@ pub struct Feature { pub max_results: i32, /// Model to use for the feature. /// Supported values: "builtin/stable" (the default if unset) and - /// "builtin/latest". + /// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + /// support "builtin/weekly" for the bleeding edge release updated weekly. #[prost(string, tag="3")] pub model: ::prost::alloc::string::String, } diff --git a/gcloud-sdk/genproto/google.cloud.vision.v1p1beta1.rs b/gcloud-sdk/genproto/google.cloud.vision.v1p1beta1.rs index de7868300..c9d542f0a 100644 --- a/gcloud-sdk/genproto/google.cloud.vision.v1p1beta1.rs +++ b/gcloud-sdk/genproto/google.cloud.vision.v1p1beta1.rs @@ -400,7 +400,8 @@ pub struct Feature { pub max_results: i32, /// Model to use for the feature. /// Supported values: "builtin/stable" (the default if unset) and - /// "builtin/latest". + /// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + /// support "builtin/weekly" for the bleeding edge release updated weekly. #[prost(string, tag="3")] pub model: ::prost::alloc::string::String, } diff --git a/gcloud-sdk/genproto/google.cloud.vision.v1p2beta1.rs b/gcloud-sdk/genproto/google.cloud.vision.v1p2beta1.rs index a59b53a90..1a96f8c8c 100644 --- a/gcloud-sdk/genproto/google.cloud.vision.v1p2beta1.rs +++ b/gcloud-sdk/genproto/google.cloud.vision.v1p2beta1.rs @@ -422,7 +422,8 @@ pub struct Feature { pub max_results: i32, /// Model to use for the feature. /// Supported values: "builtin/stable" (the default if unset) and - /// "builtin/latest". + /// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + /// support "builtin/weekly" for the bleeding edge release updated weekly. #[prost(string, tag="3")] pub model: ::prost::alloc::string::String, } diff --git a/gcloud-sdk/genproto/google.cloud.vision.v1p3beta1.rs b/gcloud-sdk/genproto/google.cloud.vision.v1p3beta1.rs index 1d49f65a9..7e8021c2d 100644 --- a/gcloud-sdk/genproto/google.cloud.vision.v1p3beta1.rs +++ b/gcloud-sdk/genproto/google.cloud.vision.v1p3beta1.rs @@ -1675,7 +1675,8 @@ pub struct Feature { pub max_results: i32, /// Model to use for the feature. /// Supported values: "builtin/stable" (the default if unset) and - /// "builtin/latest". + /// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + /// support "builtin/weekly" for the bleeding edge release updated weekly. #[prost(string, tag="3")] pub model: ::prost::alloc::string::String, } diff --git a/gcloud-sdk/genproto/google.cloud.vision.v1p4beta1.rs b/gcloud-sdk/genproto/google.cloud.vision.v1p4beta1.rs index e3c02ea57..f01659aa0 100644 --- a/gcloud-sdk/genproto/google.cloud.vision.v1p4beta1.rs +++ b/gcloud-sdk/genproto/google.cloud.vision.v1p4beta1.rs @@ -1801,7 +1801,8 @@ pub struct Feature { pub max_results: i32, /// Model to use for the feature. /// Supported values: "builtin/stable" (the default if unset) and - /// "builtin/latest". + /// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + /// support "builtin/weekly" for the bleeding edge release updated weekly. #[prost(string, tag="3")] pub model: ::prost::alloc::string::String, } diff --git a/gcloud-sdk/genproto/google.container.v1.rs b/gcloud-sdk/genproto/google.container.v1.rs index 53eaada78..494e2a18b 100644 --- a/gcloud-sdk/genproto/google.container.v1.rs +++ b/gcloud-sdk/genproto/google.container.v1.rs @@ -251,6 +251,9 @@ pub struct NodeConfig { /// All the nodes in the node pool will be Confidential VM once enabled. #[prost(message, optional, tag="35")] pub confidential_nodes: ::core::option::Option, + /// Logging configuration. + #[prost(message, optional, tag="38")] + pub logging_config: ::core::option::Option, } /// Specifies options for controlling advanced machine features. #[derive(Clone, PartialEq, ::prost::Message)] @@ -410,8 +413,9 @@ pub struct ReservationAffinity { #[prost(enumeration="reservation_affinity::Type", tag="1")] pub consume_reservation_type: i32, /// Corresponds to the label key of a reservation resource. To target a - /// SPECIFIC_RESERVATION by name, specify "googleapis.com/reservation-name" as - /// the key and specify the name of your reservation as its value. + /// SPECIFIC_RESERVATION by name, specify + /// "compute.googleapis.com/reservation-name" as the key and specify the name + /// of your reservation as its value. #[prost(string, tag="2")] pub key: ::prost::alloc::string::String, /// Corresponds to the label value(s) of reservation resource(s). @@ -1395,6 +1399,9 @@ pub struct NodeConfigDefaults { /// GCFS (Google Container File System, also known as Riptide) options. #[prost(message, optional, tag="1")] pub gcfs_config: ::core::option::Option, + /// Logging configuration for node pools. + #[prost(message, optional, tag="3")] + pub logging_config: ::core::option::Option, } /// ClusterUpdate describes an update to the cluster. Exactly one update can /// be applied to a cluster with each request, so at most one field can be @@ -1559,6 +1566,9 @@ pub struct ClusterUpdate { /// in autopilot clusters and node auto-provisioning enabled clusters. #[prost(message, optional, tag="110")] pub desired_node_pool_auto_config_network_tags: ::core::option::Option, + /// The desired node pool logging configuration defaults for the cluster. + #[prost(message, optional, tag="116")] + pub desired_node_pool_logging_config: ::core::option::Option, } /// This operation resource represents operations that may have happened or are /// happening on the cluster. All fields are output only. @@ -1950,6 +1960,9 @@ pub struct UpdateNodePoolRequest { /// Enable or disable gvnic on the node pool. #[prost(message, optional, tag="29")] pub gvnic: ::core::option::Option, + /// Logging configuration. + #[prost(message, optional, tag="32")] + pub logging_config: ::core::option::Option, } /// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. #[derive(Clone, PartialEq, ::prost::Message)] @@ -3262,7 +3275,7 @@ pub struct AutoprovisioningNodePoolDefaults { /// minCpuPlatform: Intel Haswell or /// minCpuPlatform: Intel Sandy Bridge. For more /// information, read [how to specify min CPU - /// platform]() + /// platform](). /// This field is deprecated, min_cpu_platform should be specified using /// label selector on the /// pod. @@ -4444,6 +4457,47 @@ pub struct MonitoringConfig { #[prost(message, optional, tag="2")] pub managed_prometheus_config: ::core::option::Option, } +/// NodePoolLoggingConfig specifies logging configuration for nodepools. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NodePoolLoggingConfig { + /// Logging variant configuration. + #[prost(message, optional, tag="1")] + pub variant_config: ::core::option::Option, +} +/// LoggingVariantConfig specifies the behaviour of the logging component. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoggingVariantConfig { + /// Logging variant deployed on nodes. + #[prost(enumeration="logging_variant_config::Variant", tag="1")] + pub variant: i32, +} +/// Nested message and enum types in `LoggingVariantConfig`. +pub mod logging_variant_config { + /// Logging component variants. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Variant { + /// Default value. This shouldn't be used. + Unspecified = 0, + /// default logging variant. + Default = 1, + /// maximum logging throughput variant. + MaxThroughput = 2, + } + impl Variant { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Variant::Unspecified => "VARIANT_UNSPECIFIED", + Variant::Default => "DEFAULT", + Variant::MaxThroughput => "MAX_THROUGHPUT", + } + } + } +} /// MonitoringComponentConfig is cluster monitoring component configuration. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MonitoringComponentConfig { diff --git a/gcloud-sdk/genproto/google.container.v1beta1.rs b/gcloud-sdk/genproto/google.container.v1beta1.rs index 9e8501587..36754a203 100644 --- a/gcloud-sdk/genproto/google.container.v1beta1.rs +++ b/gcloud-sdk/genproto/google.container.v1beta1.rs @@ -238,7 +238,7 @@ pub struct NodeConfig { /// `minCpuPlatform: "Intel Haswell"` or /// `minCpuPlatform: "Intel Sandy Bridge"`. For more /// information, read [how to specify min CPU - /// platform]() + /// platform](). #[prost(string, tag="13")] pub min_cpu_platform: ::prost::alloc::string::String, /// The workload metadata configuration for this node. @@ -289,6 +289,9 @@ pub struct NodeConfig { /// All the nodes in the node pool will be Confidential VM once enabled. #[prost(message, optional, tag="35")] pub confidential_nodes: ::core::option::Option, + /// Logging configuration. + #[prost(message, optional, tag="38")] + pub logging_config: ::core::option::Option, } /// Specifies options for controlling advanced machine features. #[derive(Clone, PartialEq, ::prost::Message)] @@ -465,8 +468,9 @@ pub struct ReservationAffinity { #[prost(enumeration="reservation_affinity::Type", tag="1")] pub consume_reservation_type: i32, /// Corresponds to the label key of a reservation resource. To target a - /// SPECIFIC_RESERVATION by name, specify "googleapis.com/reservation-name" as - /// the key and specify the name of your reservation as its value. + /// SPECIFIC_RESERVATION by name, specify + /// "compute.googleapis.com/reservation-name" as the key and specify the name + /// of your reservation as its value. #[prost(string, tag="2")] pub key: ::prost::alloc::string::String, /// Corresponds to the label value(s) of reservation resource(s). @@ -1723,6 +1727,9 @@ pub struct NodeConfigDefaults { /// GCFS (Google Container File System, also known as Riptide) options. #[prost(message, optional, tag="1")] pub gcfs_config: ::core::option::Option, + /// Logging configuration for node pools. + #[prost(message, optional, tag="3")] + pub logging_config: ::core::option::Option, } /// node pool configs that apply to all auto-provisioned node pools /// in autopilot clusters and node auto-provisioning enabled clusters @@ -1925,6 +1932,9 @@ pub struct ClusterUpdate { /// Enable/Disable Protect API features for the cluster. #[prost(message, optional, tag="112")] pub desired_protect_config: ::core::option::Option, + /// The desired node pool logging configuration defaults for the cluster. + #[prost(message, optional, tag="116")] + pub desired_node_pool_logging_config: ::core::option::Option, } /// This operation resource represents operations that may have happened or are /// happening on the cluster. All fields are output only. @@ -2316,6 +2326,9 @@ pub struct UpdateNodePoolRequest { /// Enable or disable gvnic on the node pool. #[prost(message, optional, tag="29")] pub gvnic: ::core::option::Option, + /// Logging configuration. + #[prost(message, optional, tag="32")] + pub logging_config: ::core::option::Option, } /// SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. #[derive(Clone, PartialEq, ::prost::Message)] @@ -3720,7 +3733,7 @@ pub struct AutoprovisioningNodePoolDefaults { /// minCpuPlatform: Intel Haswell or /// minCpuPlatform: Intel Sandy Bridge. For more /// information, read [how to specify min CPU - /// platform]() + /// platform](). /// This field is deprecated, min_cpu_platform should be specified using /// label selector on the /// pod. @@ -5089,6 +5102,47 @@ pub struct MonitoringConfig { #[prost(message, optional, tag="2")] pub managed_prometheus_config: ::core::option::Option, } +/// NodePoolLoggingConfig specifies logging configuration for nodepools. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NodePoolLoggingConfig { + /// Logging variant configuration. + #[prost(message, optional, tag="1")] + pub variant_config: ::core::option::Option, +} +/// LoggingVariantConfig specifies the behaviour of the logging component. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoggingVariantConfig { + /// Logging variant deployed on nodes. + #[prost(enumeration="logging_variant_config::Variant", tag="1")] + pub variant: i32, +} +/// Nested message and enum types in `LoggingVariantConfig`. +pub mod logging_variant_config { + /// Logging component variants. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Variant { + /// Default value. This shouldn't be used. + Unspecified = 0, + /// default logging variant. + Default = 1, + /// maximum logging throughput variant. + MaxThroughput = 2, + } + impl Variant { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Variant::Unspecified => "VARIANT_UNSPECIFIED", + Variant::Default => "DEFAULT", + Variant::MaxThroughput => "MAX_THROUGHPUT", + } + } + } +} /// MonitoringComponentConfig is cluster monitoring component configuration. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MonitoringComponentConfig { diff --git a/gcloud-sdk/genproto/google.devtools.remoteworkers.v1test2.rs b/gcloud-sdk/genproto/google.devtools.remoteworkers.v1test2.rs index 398a2075d..753ed861f 100644 --- a/gcloud-sdk/genproto/google.devtools.remoteworkers.v1test2.rs +++ b/gcloud-sdk/genproto/google.devtools.remoteworkers.v1test2.rs @@ -346,7 +346,8 @@ pub struct CreateBotSessionRequest { /// Required. The farm resource. #[prost(string, tag="1")] pub parent: ::prost::alloc::string::String, - /// Required. The bot session to create. Server-assigned fields like name must be unset. + /// Required. The bot session to create. Server-assigned fields like name must + /// be unset. #[prost(message, optional, tag="2")] pub bot_session: ::core::option::Option, } @@ -359,8 +360,8 @@ pub struct UpdateBotSessionRequest { /// Required. The bot session resource to update. #[prost(message, optional, tag="2")] pub bot_session: ::core::option::Option, - /// Required. The fields on the bot that should be updated. See the BotSession resource - /// for which fields are updatable by which caller. + /// Required. The fields on the bot that should be updated. See the BotSession + /// resource for which fields are updatable by which caller. #[prost(message, optional, tag="3")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } diff --git a/gcloud-sdk/genproto/google.firestore.v1.rs b/gcloud-sdk/genproto/google.firestore.v1.rs index 37aab8414..b10af1b71 100644 --- a/gcloud-sdk/genproto/google.firestore.v1.rs +++ b/gcloud-sdk/genproto/google.firestore.v1.rs @@ -162,22 +162,67 @@ pub struct StructuredQuery { /// `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` #[prost(message, repeated, tag="4")] pub order_by: ::prost::alloc::vec::Vec, - /// A starting point for the query results. + /// A potential prefix of a position in the result set to start the query at. + /// + /// The ordering of the result set is based on the `ORDER BY` clause of the + /// original query. + /// + /// ``` + /// SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + /// ``` + /// + /// This query's results are ordered by `(b ASC, __name__ ASC)`. + /// + /// Cursors can reference either the full ordering or a prefix of the location, + /// though it cannot reference more fields than what are in the provided + /// `ORDER BY`. + /// + /// Continuing off the example above, attaching the following start cursors + /// will have varying impact: + /// + /// - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + /// b > 2 AND __name__ > /k/123`. + /// - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + /// + /// Unlike `OFFSET` which requires scanning over the first N results to skip, + /// a start cursor allows the query to begin at a logical position. This + /// position is not required to match an actual result, it will scan forward + /// from this position to find the next document. + /// + /// Requires: + /// + /// * The number of values cannot be greater than the number of fields + /// specified in the `ORDER BY` clause. #[prost(message, optional, tag="7")] pub start_at: ::core::option::Option, - /// A end point for the query results. + /// A potential prefix of a position in the result set to end the query at. + /// + /// This is similar to `START_AT` but with it controlling the end position + /// rather than the start position. + /// + /// Requires: + /// + /// * The number of values cannot be greater than the number of fields + /// specified in the `ORDER BY` clause. #[prost(message, optional, tag="8")] pub end_at: ::core::option::Option, - /// The number of results to skip. + /// The number of documents to skip before returning the first result. /// - /// Applies before limit, but after all other constraints. Must be >= 0 if - /// specified. + /// This applies after the constraints specified by the `WHERE`, `START AT`, & + /// `END AT` but before the `LIMIT` clause. + /// + /// Requires: + /// + /// * The value must be greater than or equal to zero if specified. #[prost(int32, tag="6")] pub offset: i32, /// The maximum number of results to return. /// /// Applies after all other constraints. - /// Must be >= 0 if specified. + /// + /// Requires: + /// + /// * The value must be greater than or equal to zero if specified. #[prost(message, optional, tag="5")] pub limit: ::core::option::Option, } @@ -430,9 +475,14 @@ pub mod structured_query { #[prost(enumeration="Direction", tag="2")] pub direction: i32, } - /// A reference to a field, such as `max(messages.time) as max_time`. + /// A reference to a field in a document, ex: `stats.operations`. #[derive(Clone, PartialEq, ::prost::Message)] pub struct FieldReference { + /// The relative path of the document being referenced. + /// + /// Requires: + /// + /// * Conform to [document field name]\[google.firestore.v1.Document.fields\] limitations. #[prost(string, tag="2")] pub field_path: ::prost::alloc::string::String, } @@ -471,6 +521,107 @@ pub mod structured_query { } } } +/// Firestore query for running an aggregation over a \[StructuredQuery][google.firestore.v1.StructuredQuery\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StructuredAggregationQuery { + /// Optional. Series of aggregations to apply over the results of the `structured_query`. + /// + /// Requires: + /// + /// * A minimum of one and maximum of five aggregations per query. + #[prost(message, repeated, tag="3")] + pub aggregations: ::prost::alloc::vec::Vec, + /// The base query to aggregate over. + #[prost(oneof="structured_aggregation_query::QueryType", tags="1")] + pub query_type: ::core::option::Option, +} +/// Nested message and enum types in `StructuredAggregationQuery`. +pub mod structured_aggregation_query { + /// Defines a aggregation that produces a single result. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Aggregation { + /// Optional. Optional name of the field to store the result of the aggregation into. + /// + /// If not provided, Firestore will pick a default name following the format + /// `field_`. For example: + /// + /// ``` + /// AGGREGATE + /// COUNT_UP_TO(1) AS count_up_to_1, + /// COUNT_UP_TO(2), + /// COUNT_UP_TO(3) AS count_up_to_3, + /// COUNT_UP_TO(4) + /// OVER ( + /// ... + /// ); + /// ``` + /// + /// becomes: + /// + /// ``` + /// AGGREGATE + /// COUNT_UP_TO(1) AS count_up_to_1, + /// COUNT_UP_TO(2) AS field_1, + /// COUNT_UP_TO(3) AS count_up_to_3, + /// COUNT_UP_TO(4) AS field_2 + /// OVER ( + /// ... + /// ); + /// ``` + /// + /// Requires: + /// + /// * Must be unique across all aggregation aliases. + /// * Conform to [document field name]\[google.firestore.v1.Document.fields\] limitations. + #[prost(string, tag="7")] + pub alias: ::prost::alloc::string::String, + /// The type of aggregation to perform, required. + #[prost(oneof="aggregation::Operator", tags="1")] + pub operator: ::core::option::Option, + } + /// Nested message and enum types in `Aggregation`. + pub mod aggregation { + /// Count of documents that match the query. + /// + /// The `COUNT(*)` aggregation function operates on the entire document + /// so it does not require a field reference. + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Count { + /// Optional. Optional constraint on the maximum number of documents to count. + /// + /// This provides a way to set an upper bound on the number of documents + /// to scan, limiting latency and cost. + /// + /// Unspecified is interpreted as no bound. + /// + /// High-Level Example: + /// + /// ``` + /// AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + /// ``` + /// + /// Requires: + /// + /// * Must be greater than zero when present. + #[prost(message, optional, tag="1")] + pub up_to: ::core::option::Option, + } + /// The type of aggregation to perform, required. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Operator { + /// Count aggregator. + #[prost(message, tag="1")] + Count(Count), + } + } + /// The base query to aggregate over. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum QueryType { + /// Nested structured query. + #[prost(message, tag="1")] + StructuredQuery(super::StructuredQuery), + } +} /// A position in a query result set. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Cursor { @@ -485,6 +636,21 @@ pub struct Cursor { #[prost(bool, tag="2")] pub before: bool, } +/// The result of a single bucket from a Firestore aggregation query. +/// +/// The keys of `aggregate_fields` are the same for all results in an aggregation +/// query, unlike document queries which can have different fields present for +/// each result. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AggregationResult { + /// The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + /// + /// The key is the \[alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias\] + /// assigned to the aggregation function on input and the size of this map + /// equals the number of aggregation functions in the query. + #[prost(map="string, message", tag="2")] + pub aggregate_fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>, +} /// A set of field paths on a document. /// Used to restrict a get or update operation on a document to a subset of its /// fields. @@ -1230,6 +1396,74 @@ pub mod run_query_response { Done(bool), } } +/// The request for \[Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RunAggregationQueryRequest { + /// Required. The parent resource name. In the format: + /// `projects/{project_id}/databases/{database_id}/documents` or + /// `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + /// For example: + /// `projects/my-project/databases/my-database/documents` or + /// `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// The query to run. + #[prost(oneof="run_aggregation_query_request::QueryType", tags="2")] + pub query_type: ::core::option::Option, + /// The consistency mode for the query, defaults to strong consistency. + #[prost(oneof="run_aggregation_query_request::ConsistencySelector", tags="4, 5, 6")] + pub consistency_selector: ::core::option::Option, +} +/// Nested message and enum types in `RunAggregationQueryRequest`. +pub mod run_aggregation_query_request { + /// The query to run. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum QueryType { + /// An aggregation query. + #[prost(message, tag="2")] + StructuredAggregationQuery(super::StructuredAggregationQuery), + } + /// The consistency mode for the query, defaults to strong consistency. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum ConsistencySelector { + /// Run the aggregation within an already active transaction. + /// + /// The value here is the opaque transaction ID to execute the query in. + #[prost(bytes, tag="4")] + Transaction(::prost::alloc::vec::Vec), + /// Starts a new transaction as part of the query, defaulting to read-only. + /// + /// The new transaction ID will be returned as the first response in the + /// stream. + #[prost(message, tag="5")] + NewTransaction(super::TransactionOptions), + /// Executes the query at the given timestamp. + /// + /// Requires: + /// + /// * Cannot be more than 270 seconds in the past. + #[prost(message, tag="6")] + ReadTime(::prost_types::Timestamp), + } +} +/// The response for \[Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RunAggregationQueryResponse { + /// A single aggregation result. + /// + /// Not present when reporting partial progress. + #[prost(message, optional, tag="1")] + pub result: ::core::option::Option, + /// The transaction that was started as part of this request. + /// + /// Only present on the first response when the request requested to start + /// a new transaction. + #[prost(bytes="vec", tag="2")] + pub transaction: ::prost::alloc::vec::Vec, + /// The time at which the aggregate value is valid for. + #[prost(message, optional, tag="3")] + pub read_time: ::core::option::Option<::prost_types::Timestamp>, +} /// The request for \[Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PartitionQueryRequest { @@ -1973,6 +2207,40 @@ pub mod firestore_client { ); self.inner.server_streaming(request.into_request(), path, codec).await } + /// Runs an aggregation query. + /// + /// Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], + /// this API allows running an aggregation to produce a series of + /// [AggregationResult][google.firestore.v1.AggregationResult] server-side. + /// + /// High-Level Example: + /// + /// ``` + /// -- Return the number of documents in table given a filter. + /// SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + /// ``` + pub async fn run_aggregation_query( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response>, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.firestore.v1.Firestore/RunAggregationQuery", + ); + self.inner.server_streaming(request.into_request(), path, codec).await + } /// Partitions a query by returning partition cursors that can be used to run /// the query in parallel. The returned partition cursors are split points that /// can be used by RunQuery as starting/end points for the query results. diff --git a/gcloud-sdk/genproto/google.iam.admin.v1.rs b/gcloud-sdk/genproto/google.iam.admin.v1.rs index 4030cd71a..d05f1d153 100644 --- a/gcloud-sdk/genproto/google.iam.admin.v1.rs +++ b/gcloud-sdk/genproto/google.iam.admin.v1.rs @@ -161,8 +161,7 @@ pub struct DeleteServiceAccountRequest { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, } -/// The request for -/// \[PatchServiceAccount][google.iam.admin.v1.PatchServiceAccount\]. +/// The service account patch request. /// /// You can patch only the `display_name` and `description` fields. You must use /// the `update_mask` field to specify which of these fields you want to patch. @@ -278,8 +277,8 @@ pub struct GetServiceAccountKeyRequest { /// `unique_id` of the service account. #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, - /// The output format of the public key requested. - /// X509_PEM is the default output format. + /// Optional. The output format of the public key. The default is `TYPE_NONE`, which + /// means that the public key is not returned. #[prost(enumeration="ServiceAccountPublicKeyType", tag="2")] pub public_key_type: i32, } @@ -351,6 +350,9 @@ pub struct ServiceAccountKey { /// The key type. #[prost(enumeration="list_service_account_keys_request::KeyType", tag="10")] pub key_type: i32, + /// The key status. + #[prost(bool, tag="11")] + pub disabled: bool, } /// The service account key create request. #[derive(Clone, PartialEq, ::prost::Message)] @@ -383,10 +385,10 @@ pub struct UploadServiceAccountKeyRequest { /// `unique_id` of the service account. #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, - /// A field that allows clients to upload their own public key. If set, - /// use this public key data to create a service account key for given - /// service account. - /// Please note, the expected format for this field is X509_PEM. + /// The public key to associate with the service account. Must be an RSA public + /// key that is wrapped in an X.509 v3 certificate. Include the first line, + /// `-----BEGIN CERTIFICATE-----`, and the last line, + /// `-----END CERTIFICATE-----`. #[prost(bytes="vec", tag="2")] pub public_key_data: ::prost::alloc::vec::Vec, } @@ -401,6 +403,30 @@ pub struct DeleteServiceAccountKeyRequest { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, } +/// The service account key disable request. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisableServiceAccountKeyRequest { + /// Required. The resource name of the service account key in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. + /// + /// Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + /// the account. The `ACCOUNT` value can be the `email` address or the + /// `unique_id` of the service account. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// The service account key enable request. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EnableServiceAccountKeyRequest { + /// Required. The resource name of the service account key in the following format: + /// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. + /// + /// Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + /// the account. The `ACCOUNT` value can be the `email` address or the + /// `unique_id` of the service account. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} /// Deprecated. [Migrate to Service Account Credentials /// API](). /// @@ -471,8 +497,8 @@ pub struct SignJwtRequest { /// JWT Claims Set. For example: `{"sub": "user@example.com", "iat": 313435}` /// /// If the JWT Claims Set contains an expiration time (`exp`) claim, it must be - /// an integer timestamp that is not in the past and no more than 1 hour in the - /// future. + /// an integer timestamp that is not in the past and no more than 12 hours in + /// the future. /// /// If the JWT Claims Set does not contain an expiration time (`exp`) claim, /// this claim is added automatically, with a timestamp that is 1 hour in the @@ -553,8 +579,8 @@ pub mod role { Ga = 2, /// The user has indicated this role is being deprecated. Deprecated = 4, - /// This role is disabled and will not contribute permissions to any members - /// it is granted to in policies. + /// This role is disabled and will not contribute permissions to any + /// principals it is granted to in policies. Disabled = 5, /// The user has indicated this role is currently in an EAP phase. Eap = 6, @@ -614,26 +640,29 @@ pub struct QueryGrantableRolesResponse { pub struct ListRolesRequest { /// The `parent` parameter's value depends on the target resource for the /// request, namely - /// \[`roles`\](/iam/reference/rest/v1/roles), - /// \[`projects`\](/iam/reference/rest/v1/projects.roles), or - /// \[`organizations`\](/iam/reference/rest/v1/organizations.roles). Each - /// resource type's `parent` value format is described below: + /// \[`roles`\](), + /// \[`projects`\](), + /// or + /// \[`organizations`\](). + /// Each resource type's `parent` value format is described below: /// - /// * \[`roles.list()`\](/iam/reference/rest/v1/roles/list): An empty string. + /// * \[`roles.list()`\](): An empty string. /// This method doesn't require a resource; it simply returns all - /// [predefined roles](/iam/docs/understanding-roles#predefined_roles) in - /// Cloud IAM. Example request URL: - /// ` + /// [predefined + /// roles]() + /// in Cloud IAM. Example request URL: ` /// - /// * \[`projects.roles.list()`\](/iam/reference/rest/v1/projects.roles/list): + /// * \[`projects.roles.list()`\](): /// `projects/{PROJECT_ID}`. This method lists all project-level - /// [custom roles](/iam/docs/understanding-custom-roles). + /// [custom + /// roles](). /// Example request URL: /// ` /// - /// * \[`organizations.roles.list()`\](/iam/reference/rest/v1/organizations.roles/list): + /// * \[`organizations.roles.list()`\](): /// `organizations/{ORGANIZATION_ID}`. This method lists all - /// organization-level [custom roles](/iam/docs/understanding-custom-roles). + /// organization-level [custom + /// roles](). /// Example request URL: /// ` /// @@ -675,26 +704,30 @@ pub struct ListRolesResponse { pub struct GetRoleRequest { /// The `name` parameter's value depends on the target resource for the /// request, namely - /// \[`roles`\](/iam/reference/rest/v1/roles), - /// \[`projects`\](/iam/reference/rest/v1/projects.roles), or - /// \[`organizations`\](/iam/reference/rest/v1/organizations.roles). Each - /// resource type's `name` value format is described below: + /// \[`roles`\](), + /// \[`projects`\](), + /// or + /// \[`organizations`\](). + /// Each resource type's `name` value format is described below: /// - /// * \[`roles.get()`\](/iam/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. + /// * \[`roles.get()`\](): `roles/{ROLE_NAME}`. /// This method returns results from all - /// [predefined roles](/iam/docs/understanding-roles#predefined_roles) in - /// Cloud IAM. Example request URL: + /// [predefined + /// roles]() + /// in Cloud IAM. Example request URL: /// ` /// - /// * \[`projects.roles.get()`\](/iam/reference/rest/v1/projects.roles/get): + /// * \[`projects.roles.get()`\](): /// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only - /// [custom roles](/iam/docs/understanding-custom-roles) that have been - /// created at the project level. Example request URL: + /// [custom + /// roles]() that + /// have been created at the project level. Example request URL: /// ` /// - /// * \[`organizations.roles.get()`\](/iam/reference/rest/v1/organizations.roles/get): + /// * \[`organizations.roles.get()`\](): /// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method - /// returns only [custom roles](/iam/docs/understanding-custom-roles) that + /// returns only [custom + /// roles]() that /// have been created at the organization level. Example request URL: /// ` /// @@ -708,20 +741,23 @@ pub struct GetRoleRequest { pub struct CreateRoleRequest { /// The `parent` parameter's value depends on the target resource for the /// request, namely - /// \[`projects`\](/iam/reference/rest/v1/projects.roles) or - /// \[`organizations`\](/iam/reference/rest/v1/organizations.roles). Each - /// resource type's `parent` value format is described below: + /// \[`projects`\]() + /// or + /// \[`organizations`\](). + /// Each resource type's `parent` value format is described below: /// - /// * \[`projects.roles.create()`\](/iam/reference/rest/v1/projects.roles/create): + /// * \[`projects.roles.create()`\](): /// `projects/{PROJECT_ID}`. This method creates project-level - /// [custom roles](/iam/docs/understanding-custom-roles). + /// [custom + /// roles](). /// Example request URL: /// ` /// - /// * \[`organizations.roles.create()`\](/iam/reference/rest/v1/organizations.roles/create): + /// * \[`organizations.roles.create()`\](): /// `organizations/{ORGANIZATION_ID}`. This method creates organization-level - /// [custom roles](/iam/docs/understanding-custom-roles). Example request - /// URL: + /// [custom + /// roles](). + /// Example request URL: /// ` /// /// Note: Wildcard (*) values are invalid; you must specify a complete project @@ -744,19 +780,22 @@ pub struct CreateRoleRequest { pub struct UpdateRoleRequest { /// The `name` parameter's value depends on the target resource for the /// request, namely - /// \[`projects`\](/iam/reference/rest/v1/projects.roles) or - /// \[`organizations`\](/iam/reference/rest/v1/organizations.roles). Each - /// resource type's `name` value format is described below: + /// \[`projects`\]() + /// or + /// \[`organizations`\](). + /// Each resource type's `name` value format is described below: /// - /// * \[`projects.roles.patch()`\](/iam/reference/rest/v1/projects.roles/patch): + /// * \[`projects.roles.patch()`\](): /// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only - /// [custom roles](/iam/docs/understanding-custom-roles) that have been - /// created at the project level. Example request URL: + /// [custom + /// roles]() that + /// have been created at the project level. Example request URL: /// ` /// - /// * \[`organizations.roles.patch()`\](/iam/reference/rest/v1/organizations.roles/patch): + /// * \[`organizations.roles.patch()`\](): /// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method - /// updates only [custom roles](/iam/docs/understanding-custom-roles) that + /// updates only [custom + /// roles]() that /// have been created at the organization level. Example request URL: /// ` /// @@ -776,19 +815,22 @@ pub struct UpdateRoleRequest { pub struct DeleteRoleRequest { /// The `name` parameter's value depends on the target resource for the /// request, namely - /// \[`projects`\](/iam/reference/rest/v1/projects.roles) or - /// \[`organizations`\](/iam/reference/rest/v1/organizations.roles). Each - /// resource type's `name` value format is described below: + /// \[`projects`\]() + /// or + /// \[`organizations`\](). + /// Each resource type's `name` value format is described below: /// - /// * \[`projects.roles.delete()`\](/iam/reference/rest/v1/projects.roles/delete): + /// * \[`projects.roles.delete()`\](): /// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only - /// [custom roles](/iam/docs/understanding-custom-roles) that have been - /// created at the project level. Example request URL: + /// [custom + /// roles]() that + /// have been created at the project level. Example request URL: /// ` /// - /// * \[`organizations.roles.delete()`\](/iam/reference/rest/v1/organizations.roles/delete): + /// * \[`organizations.roles.delete()`\](): /// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method - /// deletes only [custom roles](/iam/docs/understanding-custom-roles) that + /// deletes only [custom + /// roles]() that /// have been created at the organization level. Example request URL: /// ` /// @@ -805,19 +847,22 @@ pub struct DeleteRoleRequest { pub struct UndeleteRoleRequest { /// The `name` parameter's value depends on the target resource for the /// request, namely - /// \[`projects`\](/iam/reference/rest/v1/projects.roles) or - /// \[`organizations`\](/iam/reference/rest/v1/organizations.roles). Each - /// resource type's `name` value format is described below: + /// \[`projects`\]() + /// or + /// \[`organizations`\](). + /// Each resource type's `name` value format is described below: /// - /// * \[`projects.roles.undelete()`\](/iam/reference/rest/v1/projects.roles/undelete): + /// * \[`projects.roles.undelete()`\](): /// `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes - /// only [custom roles](/iam/docs/understanding-custom-roles) that have been - /// created at the project level. Example request URL: + /// only [custom + /// roles]() that + /// have been created at the project level. Example request URL: /// ` /// - /// * \[`organizations.roles.undelete()`\](/iam/reference/rest/v1/organizations.roles/undelete): + /// * \[`organizations.roles.undelete()`\](): /// `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method - /// undeletes only [custom roles](/iam/docs/understanding-custom-roles) that + /// undeletes only [custom + /// roles]() that /// have been created at the organization level. Example request URL: /// ` /// @@ -892,7 +937,7 @@ pub mod permission { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum CustomRolesSupportLevel { - /// Permission is fully supported for custom role use. + /// Default state. Permission is fully supported for custom role use. Supported = 0, /// Permission is being tested to check custom role compatibility. Testing = 1, @@ -1076,7 +1121,7 @@ pub mod lint_result { /// This includes the following common scenarios: /// /// - Unsatisfiable condition: Expired timestamp in date/time condition. - /// - Ineffective condition: Condition on a pair which is + /// - Ineffective condition: Condition on a pair which is /// granted unconditionally in another binding of the same policy. Warning = 2, /// Reserved for the issues that are not severe as `ERROR`/`WARNING`, but @@ -1170,7 +1215,7 @@ impl ServiceAccountPrivateKeyType { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ServiceAccountPublicKeyType { - /// Unspecified. Returns nothing here. + /// Do not return the public key. TypeNone = 0, /// X509 PEM format. TypeX509PemFile = 1, @@ -1250,9 +1295,9 @@ pub mod iam_client { /// * **Service account keys**, which service accounts use to authenticate with /// Google APIs /// * **IAM policies for service accounts**, which specify the roles that a - /// member has for the service account + /// principal has for the service account /// * **IAM custom roles**, which help you limit the number of permissions that - /// you grant to members + /// you grant to principals /// /// In addition, you can use this service to complete the following tasks, among /// others: @@ -1260,6 +1305,16 @@ pub mod iam_client { /// * Test whether a service account can use specific permissions /// * Check which roles you can grant for a specific resource /// * Lint, or validate, condition expressions in an IAM policy + /// + /// When you read data from the IAM API, each read is eventually consistent. In + /// other words, if you write data with the IAM API, then immediately read that + /// data, the read operation might return an older version of the data. To deal + /// with this behavior, your application can retry the request with truncated + /// exponential backoff. + /// + /// In contrast, writing data to the IAM API is sequentially consistent. In other + /// words, write operations are always processed in the order in which they were + /// received. #[derive(Debug, Clone)] pub struct IamClient { inner: tonic::client::Grpc, @@ -1389,7 +1444,7 @@ pub mod iam_client { /// /// Updates a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. /// - /// You can update only the `display_name` and `description` fields. + /// You can update only the `display_name` field. pub async fn update_service_account( &mut self, request: impl tonic::IntoRequest, @@ -1618,7 +1673,11 @@ pub mod iam_client { ); self.inner.unary(request.into_request(), path, codec).await } - /// Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey], using a public key that you provide. + /// Uploads the public key portion of a key pair that you manage, and + /// associates the public key with a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. + /// + /// After you upload the public key, you can use the private key from the key + /// pair as a service account key. pub async fn upload_service_account_key( &mut self, request: impl tonic::IntoRequest, @@ -1660,6 +1719,47 @@ pub mod iam_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Disable a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. A disabled service account key can be + /// re-enabled with [EnableServiceAccountKey][google.iam.admin.v1.IAM.EnableServiceAccountKey]. + pub async fn disable_service_account_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.iam.admin.v1.IAM/DisableServiceAccountKey", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Enable a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. + pub async fn enable_service_account_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.iam.admin.v1.IAM/EnableServiceAccountKey", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// **Note:** This method is deprecated. Use the /// [`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signBlob) /// method in the IAM Service Account Credentials API instead. If you currently @@ -1716,7 +1816,7 @@ pub mod iam_client { self.inner.unary(request.into_request(), path, codec).await } /// Gets the IAM policy that is attached to a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. This IAM - /// policy specifies which members have access to the service account. + /// policy specifies which principals have access to the service account. /// /// This method does not tell you whether the service account has been granted /// any roles on other resources. To check whether a service account has role @@ -1749,7 +1849,7 @@ pub mod iam_client { /// Sets the IAM policy that is attached to a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. /// /// Use this method to grant or revoke access to the service account. For - /// example, you could grant a member the ability to impersonate the service + /// example, you could grant a principal the ability to impersonate the service /// account. /// /// This method does not enable the service account to access other resources. @@ -1761,8 +1861,10 @@ pub mod iam_client { /// 3. Call the resource's `setIamPolicy` method to update its IAM policy. /// /// For detailed instructions, see - /// [Granting roles to a service account for specific - /// resources](https://cloud.google.com/iam/help/service-accounts/granting-access-to-service-accounts). + /// [Manage access to project, folders, and + /// organizations](https://cloud.google.com/iam/help/service-accounts/granting-access-to-service-accounts) + /// or [Manage access to other + /// resources](https://cloud.google.com/iam/help/access/manage-other-resources). pub async fn set_iam_policy( &mut self, request: impl tonic::IntoRequest< @@ -1917,7 +2019,7 @@ pub mod iam_client { /// /// When you delete a custom role, the following changes occur immediately: /// - /// * You cannot bind a member to the custom role in an IAM + /// * You cannot bind a principal to the custom role in an IAM /// [Policy][google.iam.v1.Policy]. /// * Existing bindings to the custom role are not changed, but they have no /// effect. @@ -1970,7 +2072,7 @@ pub mod iam_client { self.inner.unary(request.into_request(), path, codec).await } /// Lists every permission that you can test on a resource. A permission is - /// testable if you can check whether a member has that permission on the + /// testable if you can check whether a principal has that permission on the /// resource. pub async fn query_testable_permissions( &mut self, diff --git a/gcloud-sdk/genproto/google.maps.addressvalidation.v1.rs b/gcloud-sdk/genproto/google.maps.addressvalidation.v1.rs new file mode 100644 index 000000000..f3d76de99 --- /dev/null +++ b/gcloud-sdk/genproto/google.maps.addressvalidation.v1.rs @@ -0,0 +1,754 @@ +/// Details of the address parsed from the input. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Address { + /// The corrected address, formatted as a single-line address following the + /// address formatting rules of the region where the address is located. + #[prost(string, tag="2")] + pub formatted_address: ::prost::alloc::string::String, + /// The validated address represented as a postal address. + #[prost(message, optional, tag="3")] + pub postal_address: ::core::option::Option, + /// The individual address components of the formatted and corrected address, + /// along with validation information. This provides information on the + /// validation status of the individual components. + #[prost(message, repeated, tag="4")] + pub address_components: ::prost::alloc::vec::Vec, + /// The types of components that were expected to be present in a correctly + /// formatted mailing address but were not found in the input AND could + /// not be inferred. Components of this type are not present in + /// `formatted_address`, `postal_address`, or `address_components`. An + /// example might be `[‘street_number’, ‘route’]` for an input like + /// “Boulder, Colorado, 80301, USA.” The list of possible types can be found + /// \[here\](). + #[prost(string, repeated, tag="5")] + pub missing_component_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// The types of the components that are present in the `address_components` + /// but could not be confirmed to be correct. This field is provided for the + /// sake of convenience: its contents are equivalent to iterating through the + /// `address_components` to find the types of all the components where the + /// \[confirmation_level][google.maps.addressvalidation.v1.AddressComponent.confirmation_level\] + /// is not + /// \[CONFIRMED][google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel.CONFIRMED\] + /// or the + /// \[inferred][google.maps.addressvalidation.v1.AddressComponent.inferred\] + /// flag is not set to `true`.The list of possible types can be found + /// \[here\](). + #[prost(string, repeated, tag="6")] + pub unconfirmed_component_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Any tokens in the input that could not be resolved. This might be an + /// input that was not recognized as a valid part of an address (for example + /// in an input like "123235253253 Main St, San Francisco, CA, 94105", the + /// unresolved tokens may look like `\["123235253253"\]` since that does not + /// look like a valid street number. + #[prost(string, repeated, tag="7")] + pub unresolved_tokens: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Represents an address component, such as a street, city, or state. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddressComponent { + /// The name for this component. + #[prost(message, optional, tag="1")] + pub component_name: ::core::option::Option, + /// The type of the address component. See + /// [Table 2: Additional types returned by the Places + /// service]() + /// for a list of possible types. + #[prost(string, tag="2")] + pub component_type: ::prost::alloc::string::String, + /// Indicates the level of certainty that we have that the component + /// is correct. + #[prost(enumeration="address_component::ConfirmationLevel", tag="3")] + pub confirmation_level: i32, + /// Indicates that the component was not part of the input, but we + /// inferred it for the address location and believe it should be provided + /// for a complete address. + #[prost(bool, tag="4")] + pub inferred: bool, + /// Indicates the spelling of the component name was corrected in a minor way, + /// for example by switching two characters that appeared in the wrong order. + /// This indicates a cosmetic change. + #[prost(bool, tag="5")] + pub spell_corrected: bool, + /// Indicates the name of the component was replaced with a completely + /// different one, for example a wrong postal code being replaced with one that + /// is correct for the address. This is not a cosmetic change, the input + /// component has been changed to a different one. + #[prost(bool, tag="6")] + pub replaced: bool, + /// Indicates an address component that is not expected to be present in a + /// postal address for the given region. We have retained it only because it + /// was part of the input. + #[prost(bool, tag="7")] + pub unexpected: bool, +} +/// Nested message and enum types in `AddressComponent`. +pub mod address_component { + /// The different possible values for confirmation levels. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum ConfirmationLevel { + /// Default value. This value is unused. + Unspecified = 0, + /// We were able to verify that this component exists and makes sense in the + /// context of the rest of the address. + Confirmed = 1, + /// This component could not be confirmed, but it is plausible that it + /// exists. For example, a street number within a known valid range of + /// numbers on a street where specific house numbers are not known. + UnconfirmedButPlausible = 2, + /// This component was not confirmed and is likely to be wrong. For + /// example, a neighborhood that does not fit the rest of the address. + UnconfirmedAndSuspicious = 3, + } + impl ConfirmationLevel { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ConfirmationLevel::Unspecified => "CONFIRMATION_LEVEL_UNSPECIFIED", + ConfirmationLevel::Confirmed => "CONFIRMED", + ConfirmationLevel::UnconfirmedButPlausible => "UNCONFIRMED_BUT_PLAUSIBLE", + ConfirmationLevel::UnconfirmedAndSuspicious => "UNCONFIRMED_AND_SUSPICIOUS", + } + } + } +} +/// A wrapper for the name of the component. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ComponentName { + /// The name text. For example, "5th Avenue" for a street name or "1253" for a + /// street number. + #[prost(string, tag="1")] + pub text: ::prost::alloc::string::String, + /// The BCP-47 language code. This will not be present if the component name is + /// not associated with a language, such as a street number. + #[prost(string, tag="2")] + pub language_code: ::prost::alloc::string::String, +} +/// Contains information about the place the input was geocoded to. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Geocode { + /// The geocoded location of the input. + /// + /// Using place IDs is preferred over using addresses, + /// latitude/longitude coordinates, or plus codes. Using coordinates when + /// routing or calculating driving directions will always result in the point + /// being snapped to the road nearest to those coordinates. This may not be a + /// road that will quickly or safely lead to the destination and may not be + /// near an access point to the property. Additionally, when a location is + /// reverse geocoded, there is no guarantee that the returned address will + /// match the original. + #[prost(message, optional, tag="1")] + pub location: ::core::option::Option, + /// The plus code corresponding to the `location`. + #[prost(message, optional, tag="2")] + pub plus_code: ::core::option::Option, + /// The bounds of the geocoded place. + #[prost(message, optional, tag="4")] + pub bounds: ::core::option::Option, + /// The size of the geocoded place, in meters. This is another measure of the + /// coarseness of the geocoded location, but in physical size rather than in + /// semantic meaning. + #[prost(float, tag="5")] + pub feature_size_meters: f32, + /// The PlaceID of the place this input geocodes to. + /// + /// For more information about Place IDs see + /// \[here\](). + #[prost(string, tag="6")] + pub place_id: ::prost::alloc::string::String, + /// The type(s) of place that the input geocoded to. For example, + /// `['locality', 'political']`. The full list of types + /// can be + /// found + /// \[here\](). + #[prost(string, repeated, tag="7")] + pub place_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Plus code () is a location reference with two formats: +/// global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, +/// and compound code, replacing the prefix with a reference location. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PlusCode { + /// Place's global (full) code, such as "9FWM33GV+HQ", representing an + /// 1/8000 by 1/8000 degree area (~14 by 14 meters). + #[prost(string, tag="1")] + pub global_code: ::prost::alloc::string::String, + /// Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing + /// the suffix of the global code and replacing the prefix with a formatted + /// name of a reference entity. + #[prost(string, tag="2")] + pub compound_code: ::prost::alloc::string::String, +} +/// The metadata for the address +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddressMetadata { + /// Indicates that this address is a high-rise building. + /// If unset, indicates that the value is unknown. + #[prost(bool, optional, tag="1")] + pub highrise: ::core::option::Option, + /// Indicates that this is the address of a business. + /// If unset, indicates that the value is unknown. + #[prost(bool, optional, tag="2")] + pub business: ::core::option::Option, + /// Indicates that the address of a PO box. + /// If unset, indicates that the value is unknown. + #[prost(bool, optional, tag="3")] + pub po_box: ::core::option::Option, + /// Indicates that the address is of a multi_family building. + /// If unset, indicates that the value is unknown. + #[prost(bool, optional, tag="4")] + pub multi_family: ::core::option::Option, + /// Indicates that this is the address of a residence. + /// If unset, indicates that the value is unknown. + #[prost(bool, optional, tag="6")] + pub residential: ::core::option::Option, +} +/// USPS representation of a US address. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UspsAddress { + /// First address line. + #[prost(string, tag="1")] + pub first_address_line: ::prost::alloc::string::String, + /// Firm name. + #[prost(string, tag="2")] + pub firm: ::prost::alloc::string::String, + /// Second address line. + #[prost(string, tag="3")] + pub second_address_line: ::prost::alloc::string::String, + /// Puerto Rican urbanization name. + #[prost(string, tag="4")] + pub urbanization: ::prost::alloc::string::String, + /// City + state + postal code. + #[prost(string, tag="5")] + pub city_state_zip_address_line: ::prost::alloc::string::String, + /// City name. + #[prost(string, tag="6")] + pub city: ::prost::alloc::string::String, + /// 2 letter state code. + #[prost(string, tag="7")] + pub state: ::prost::alloc::string::String, + /// Postal code e.g. 10009. + #[prost(string, tag="8")] + pub zip_code: ::prost::alloc::string::String, + /// 4-digit postal code extension e.g. 5023. + #[prost(string, tag="9")] + pub zip_code_extension: ::prost::alloc::string::String, +} +/// The USPS data for the address. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UspsData { + /// USPS standardized address. + #[prost(message, optional, tag="1")] + pub standardized_address: ::core::option::Option, + /// 2 digit delivery point code + #[prost(string, tag="2")] + pub delivery_point_code: ::prost::alloc::string::String, + /// The delivery point check digit. This number is added to the end of the + /// delivery_point_barcode for mechanically scanned mail. Adding all the + /// digits of the delivery_point_barcode, delivery_point_check_digit, postal + /// code, and ZIP+4 together should yield a number divisible by 10. + #[prost(string, tag="3")] + pub delivery_point_check_digit: ::prost::alloc::string::String, + /// The possible values for DPV confirmation. Returns a single character. + /// + /// * `Y`: Address was DPV confirmed for primary and any secondary numbers. + /// * `N`: Primary and any secondary number information failed to + /// DPV confirm. + /// * `S`: Address was DPV confirmed for the primary number only, and the + /// secondary number information was present by not confirmed. + /// * `D`: Address was DPV confirmed for the primary number only, and the + /// secondary number information was missing. + #[prost(string, tag="4")] + pub dpv_confirmation: ::prost::alloc::string::String, + /// The footnotes from delivery point validation. + /// Multiple footnotes may be strung together in the same string. + /// + /// * `AA`: Input address matched to the ZIP+4 file + /// * `A1`: Input address was not matched to the ZIP+4 file + /// * `BB`: Matched to DPV (all components) + /// * `CC`: Secondary number not matched (present but invalid) + /// * `N1`: High-rise address missing secondary number + /// * `M1`: Primary number missing + /// * `M3`: Primary number invalid + /// * `P1`: Input address RR or HC box number missing + /// * `P3`: Input address PO, RR, or HC Box number invalid + /// * `F1`: Input address matched to a military address + /// * `G1`: Input address matched to a general delivery address + /// * `U1`: Input address matched to a unique ZIP code + /// * `PB`: Input address matched to PBSA record + /// * `RR`: DPV confirmed address with PMB information + /// * `R1`: DPV confirmed address without PMB information + /// * `R7`: Carrier Route R777 or R779 record + #[prost(string, tag="5")] + pub dpv_footnote: ::prost::alloc::string::String, + /// Indicates if the address is a CMRA (Commercial Mail Receiving Agency)--a + /// private business receiving mail for clients. Returns a single character. + /// + /// * `Y`: The address is a CMRA + /// * `N`: The address is not a CMRA + #[prost(string, tag="6")] + pub dpv_cmra: ::prost::alloc::string::String, + /// Is this place vacant? + /// Returns a single character. + /// + /// * `Y`: The address is vacant + /// * `N`: The address is not vacant + #[prost(string, tag="7")] + pub dpv_vacant: ::prost::alloc::string::String, + /// Is this a no stat address or an active address? + /// No stat addresses are ones which are not continuously occupied or addresses + /// that the USPS does not service. Returns a single character. + /// + /// * `Y`: The address is not active + /// * `N`: The address is active + #[prost(string, tag="8")] + pub dpv_no_stat: ::prost::alloc::string::String, + /// Carrier route rate sort indicator. + #[prost(string, tag="10")] + pub carrier_route_indicator: ::prost::alloc::string::String, + /// The delivery address is matchable, but the EWS file indicates that an exact + /// match will be available soon. + #[prost(bool, tag="11")] + pub ews_no_match: bool, + /// Main post office city. + #[prost(string, tag="12")] + pub post_office_city: ::prost::alloc::string::String, + /// Main post office state. + #[prost(string, tag="13")] + pub post_office_state: ::prost::alloc::string::String, + /// Abbreviated city. + #[prost(string, tag="14")] + pub abbreviated_city: ::prost::alloc::string::String, + /// FIPS county code. + #[prost(string, tag="15")] + pub fips_county_code: ::prost::alloc::string::String, + /// County name. + #[prost(string, tag="16")] + pub county: ::prost::alloc::string::String, + /// Enhanced Line of Travel (eLOT) number. + #[prost(string, tag="17")] + pub elot_number: ::prost::alloc::string::String, + /// eLOT Ascending/Descending Flag (A/D). + #[prost(string, tag="18")] + pub elot_flag: ::prost::alloc::string::String, + /// LACSLink return code. + #[prost(string, tag="19")] + pub lacs_link_return_code: ::prost::alloc::string::String, + /// LACSLink indicator. + #[prost(string, tag="20")] + pub lacs_link_indicator: ::prost::alloc::string::String, + /// PO Box only postal code. + #[prost(bool, tag="21")] + pub po_box_only_postal_code: bool, + /// Footnotes from matching a street or highrise record to suite information. + /// If business name match is found, the secondary number is returned. + /// + /// * `A`: SuiteLink record match, business address improved. + /// * `00`: No match, business address is not improved. + #[prost(string, tag="22")] + pub suitelink_footnote: ::prost::alloc::string::String, + /// PMB (Private Mail Box) unit designator. + #[prost(string, tag="23")] + pub pmb_designator: ::prost::alloc::string::String, + /// PMB (Private Mail Box) number; + #[prost(string, tag="24")] + pub pmb_number: ::prost::alloc::string::String, + /// Type of the address record that matches the input address. + /// + /// * `F`: FIRM. This is a match to a Firm Record, which is the finest level of + /// match available for an address. + /// * `G`: GENERAL DELIVERY. This is a match to a General Delivery record. + /// * `H`: BUILDING / APARTMENT. This is a match to a Building or Apartment + /// record. + /// * `P`: POST OFFICE BOX. This is a match to a Post Office Box. + /// * `R`: RURAL ROUTE or HIGHWAY CONTRACT: This is a match to either a Rural + /// Route or a Highway Contract record, both of which may have associated Box + /// Number ranges. + /// * `S`: STREET RECORD: This is a match to a Street record containing a valid + /// primary number range. + #[prost(string, tag="25")] + pub address_record_type: ::prost::alloc::string::String, + /// Indicator that a default address was found, but more specific addresses + /// exists. + #[prost(bool, tag="26")] + pub default_address: bool, + /// Error message for USPS data retrieval. If this field is populated, other + /// USPS data response fields - with the possible exception of + /// carrier_route - are not populated. Otherwise, fields with data are + /// populated. + #[prost(string, tag="27")] + pub error_message: ::prost::alloc::string::String, +} +/// The request for validating an address. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidateAddressRequest { + /// Required. The address being validated. Unformatted addresses should be + /// submitted via \[`address_lines`][google.type.PostalAddress.address_lines\]. + /// + /// The total length of the fields in this input must not exceed 300 + /// characters. + /// + /// Supported regions can be found in the + /// \[FAQ\](). + /// + /// The \[language_code][google.type.PostalAddress.language_code\] value for the + /// given address is not yet used. The validated address result will be + /// populated based on the preferred language for the given address, as + /// identified by the system. + /// + /// The Address Validation API ignores the values in + /// \[recipients][google.type.PostalAddress.recipients\] and + /// \[organization][google.type.PostalAddress.organization\]. Any values in those + /// fields will be discarded and not returned. Please do not set them. + #[prost(message, optional, tag="1")] + pub address: ::core::option::Option, + /// This field must be empty for the first address validation request. If + /// more requests are necessary to fully validate a single address (for + /// example if the changes the user makes after the initial validation need to + /// be re-validated), then each followup request must populate this field with + /// the + /// \[response_id][google.maps.addressvalidation.v1.ValidateAddressResponse.response_id\] + /// from the very first response in the validation sequence. + #[prost(string, tag="2")] + pub previous_response_id: ::prost::alloc::string::String, + /// Enables USPS CASS compatible mode. This affects _only_ the + /// \[google.maps.addressvalidation.v1.ValidationResult.usps_data\] field of + /// \[google.maps.addressvalidation.v1.ValidationResult\]. Note: for USPS CASS + /// enabled requests for addresses in Puerto Rico, a + /// \[google.type.PostalAddress.region_code\] of the `address` must be provided + /// as "PR", or an \[google.type.PostalAddress.administrative_area\] of the + /// `address` must be provided as "Puerto Rico" (case-insensitive) or "PR". + /// + /// It's recommended to use a componentized `address`, or alternatively specify + /// at least two \[google.type.PostalAddress.address_lines\] where the first line + /// contains the street number and name and the second line contains the city, + /// state, and zip code. + /// + /// Warning: though this option will enable the USPS CASS compatible mode, the + /// Address Validation API is not yet officially CASS certified. + #[prost(bool, tag="3")] + pub enable_usps_cass: bool, +} +/// The response to an address validation request. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidateAddressResponse { + /// The result of the address validation. + #[prost(message, optional, tag="1")] + pub result: ::core::option::Option, + /// The UUID that identifies this response. If the address needs to be + /// re-validated, this UUID *must* accompany the new request. + #[prost(string, tag="2")] + pub response_id: ::prost::alloc::string::String, +} +/// The request for sending validation feedback. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProvideValidationFeedbackRequest { + /// Required. The outcome of the sequence of validation attempts. + /// + /// If this field is set to `VALIDATION_CONCLUSION_UNSPECIFIED`, an + /// `INVALID_ARGUMENT` error will be returned. + #[prost(enumeration="provide_validation_feedback_request::ValidationConclusion", tag="1")] + pub conclusion: i32, + /// Required. The ID of the response that this feedback is for. This should be the + /// \[response_id][google.maps.addressvalidation.v1.ValidateAddressRequest.response_id\] + /// from the first response in a series of address validation attempts. + #[prost(string, tag="2")] + pub response_id: ::prost::alloc::string::String, +} +/// Nested message and enum types in `ProvideValidationFeedbackRequest`. +pub mod provide_validation_feedback_request { + /// The possible final outcomes of the sequence of address validation requests + /// needed to validate an address. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum ValidationConclusion { + /// This value is unused. + /// If the `ProvideValidationFeedbackRequest.conclusion` field is set to + /// `VALIDATION_CONCLUSION_UNSPECIFIED`, an `INVALID_ARGUMENT` error will be + /// returned. + Unspecified = 0, + /// The version of the address returned by the Address Validation API was + /// used for the transaction. + ValidatedVersionUsed = 1, + /// The version of the address provided by the user was used for the + /// transaction + UserVersionUsed = 2, + /// A version of the address that was entered after the last validation + /// attempt but that was not re-validated was used for the transaction. + UnvalidatedVersionUsed = 3, + /// The transaction was abandoned and the address was not used. + Unused = 4, + } + impl ValidationConclusion { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ValidationConclusion::Unspecified => "VALIDATION_CONCLUSION_UNSPECIFIED", + ValidationConclusion::ValidatedVersionUsed => "VALIDATED_VERSION_USED", + ValidationConclusion::UserVersionUsed => "USER_VERSION_USED", + ValidationConclusion::UnvalidatedVersionUsed => "UNVALIDATED_VERSION_USED", + ValidationConclusion::Unused => "UNUSED", + } + } + } +} +/// The response for validation feedback. +/// +/// The response is empty if the feedback is sent successfully. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProvideValidationFeedbackResponse { +} +/// The result of validating an address. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidationResult { + /// Overall verdict flags + #[prost(message, optional, tag="1")] + pub verdict: ::core::option::Option, + /// Information about the address itself as opposed to the geocode. + #[prost(message, optional, tag="2")] + pub address: ::core::option::Option
, + /// Information about the location and place that the address geocoded to. + #[prost(message, optional, tag="3")] + pub geocode: ::core::option::Option, + /// Other information relevant to deliverability. + #[prost(message, optional, tag="4")] + pub metadata: ::core::option::Option, + /// Extra deliverability flags provided by USPS. Only provided for US + /// addresses. + #[prost(message, optional, tag="5")] + pub usps_data: ::core::option::Option, +} +/// High level overview of the address validation result and geocode. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Verdict { + /// The granularity of the **input** address. This is the result of parsing the + /// input address and does not give any validation signals. For validation + /// signals, refer to `validation_granularity` below. + /// + /// For example, if the input address includes a specific apartment number, + /// then the `input_granularity` here will be `SUB_PREMISE`. If we cannot match + /// the apartment number in the databases or the apartment number is invalid, + /// the `validation_granularity` will likely be `PREMISE` or below. + #[prost(enumeration="verdict::Granularity", tag="1")] + pub input_granularity: i32, + /// The granularity level that the API can fully **validate** the address to. + /// For example, an `validation_granularity` of `PREMISE` indicates all address + /// components at the level of `PREMISE` or more coarse can be validated. + /// + /// Per address component validation result can be found in + /// \[google.maps.addressvalidation.v1.Address.address_components\]. + #[prost(enumeration="verdict::Granularity", tag="2")] + pub validation_granularity: i32, + /// Information about the granularity of the + /// \[`geocode`][google.maps.addressvalidation.v1.ValidationResult.geocode\]. + /// This can be understood as the semantic meaning of how coarse or fine the + /// geocoded location is. + /// + /// This can differ from the `validation_granularity` above occasionally. For + /// example, our database might record the existence of an apartment number but + /// do not have a precise location for the apartment within a big apartment + /// complex. In that case, the `validation_granularity` will be `SUB_PREMISE` + /// but the `geocode_granularity` will be `PREMISE`. + #[prost(enumeration="verdict::Granularity", tag="3")] + pub geocode_granularity: i32, + /// The address is considered complete if there are no unresolved tokens, no + /// unexpected or missing address components. See + /// \[`missing_component_types`][google.maps.addressvalidation.v1.Address.missing_component_types\], + /// \[`unresolved_tokens`][google.maps.addressvalidation.v1.Address.unresolved_tokens\] + /// or + /// \[`unexpected`][google.maps.addressvalidation.v1.AddressComponent.unexpected\] + /// fields for more details. + #[prost(bool, tag="4")] + pub address_complete: bool, + /// At least one address component cannot be categorized or validated, see + /// \[google.maps.addressvalidation.v1.Address.address_components\] for + /// details. + #[prost(bool, tag="5")] + pub has_unconfirmed_components: bool, + /// At least one address component was inferred (added) that wasn't in the + /// input, see + /// \[google.maps.addressvalidation.v1.Address.address_components\] for + /// details. + #[prost(bool, tag="6")] + pub has_inferred_components: bool, + /// At least one address component was replaced, see + /// \[google.maps.addressvalidation.v1.Address.address_components\] for + /// details. + #[prost(bool, tag="7")] + pub has_replaced_components: bool, +} +/// Nested message and enum types in `Verdict`. +pub mod verdict { + /// The various granularities that an address or a geocode can have. + /// When used to indicate granularity for an *address*, these values indicate + /// with how fine a granularity the address identifies a mailing destination. + /// For example, an address such as "123 Main Street, Redwood City, CA, 94061" + /// identifies a `PREMISE` while something like "Redwood City, CA, 94061" + /// identifies a `LOCALITY`. However, if we are unable to find a geocode for + /// "123 Main Street" in Redwood City, the geocode returned might be of + /// `LOCALITY` granularity even though the address is more granular. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Granularity { + /// Default value. This value is unused. + Unspecified = 0, + /// Below-building level result, such as an apartment. + SubPremise = 1, + /// Building-level result. + Premise = 2, + /// A geocode that should be very close to the building-level location of + /// the address. Only used for geocodes and not for addresses. + PremiseProximity = 3, + /// The address or geocode indicates a block. Only used in regions which + /// have block-level addressing, such as Japan. + Block = 4, + /// The geocode or address is granular to route, such as a street, road, or + /// highway. + Route = 5, + /// All other granularities, which are bucketed together since they are not + /// deliverable. + Other = 6, + } + impl Granularity { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Granularity::Unspecified => "GRANULARITY_UNSPECIFIED", + Granularity::SubPremise => "SUB_PREMISE", + Granularity::Premise => "PREMISE", + Granularity::PremiseProximity => "PREMISE_PROXIMITY", + Granularity::Block => "BLOCK", + Granularity::Route => "ROUTE", + Granularity::Other => "OTHER", + } + } + } +} +/// Generated client implementations. +pub mod address_validation_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// The service for validating addresses. + #[derive(Debug, Clone)] + pub struct AddressValidationClient { + inner: tonic::client::Grpc, + } + impl AddressValidationClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: std::convert::TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl AddressValidationClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> AddressValidationClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + AddressValidationClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Validates an address. + pub async fn validate_address( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.maps.addressvalidation.v1.AddressValidation/ValidateAddress", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Feedback about the outcome of the sequence of validation attempts. This + /// should be the last call made after a sequence of validation calls for the + /// same address, and should be called once the transaction is concluded. This + /// should only be sent once for the sequence of `ValidateAddress` requests + /// needed to validate an address fully. + pub async fn provide_validation_feedback( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.maps.addressvalidation.v1.AddressValidation/ProvideValidationFeedback", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} diff --git a/gcloud-sdk/genproto/google.spanner.admin.instance.v1.rs b/gcloud-sdk/genproto/google.spanner.admin.instance.v1.rs index 700b40670..66ac64093 100644 --- a/gcloud-sdk/genproto/google.spanner.admin.instance.v1.rs +++ b/gcloud-sdk/genproto/google.spanner.admin.instance.v1.rs @@ -1,3 +1,19 @@ +/// Encapsulates progress related information for a Cloud Spanner long +/// running instance operations. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OperationProgress { + /// Percent completion of the operation. + /// Values are between 0 and 100 inclusive. + #[prost(int32, tag="1")] + pub progress_percent: i32, + /// Time the request was received. + #[prost(message, optional, tag="2")] + pub start_time: ::core::option::Option<::prost_types::Timestamp>, + /// If set, the time at which this operation failed or was completed + /// successfully. + #[prost(message, optional, tag="3")] + pub end_time: ::core::option::Option<::prost_types::Timestamp>, +} #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReplicaInfo { /// The location of the serving resources, e.g. "us-central1". @@ -74,14 +90,122 @@ pub struct InstanceConfig { /// The name of this instance configuration as it appears in UIs. #[prost(string, tag="2")] pub display_name: ::prost::alloc::string::String, + /// Output only. Whether this instance config is a Google or User Managed + /// Configuration. + #[prost(enumeration="instance_config::Type", tag="5")] + pub config_type: i32, /// The geographic placement of nodes in this instance configuration and their /// replication properties. #[prost(message, repeated, tag="3")] pub replicas: ::prost::alloc::vec::Vec, + /// Output only. The available optional replicas to choose from for user + /// managed configurations. Populated for Google managed configurations. + #[prost(message, repeated, tag="6")] + pub optional_replicas: ::prost::alloc::vec::Vec, + /// Base configuration name, e.g. projects//instanceConfigs/nam3, + /// based on which this configuration is created. Only set for user managed + /// configurations. `base_config` must refer to a configuration of type + /// GOOGLE_MANAGED in the same project as this configuration. + #[prost(string, tag="7")] + pub base_config: ::prost::alloc::string::String, + /// Cloud Labels are a flexible and lightweight mechanism for organizing cloud + /// resources into groups that reflect a customer's organizational needs and + /// deployment strategies. Cloud Labels can be used to filter collections of + /// resources. They can be used to control how resource metrics are aggregated. + /// And they can be used as arguments to policy management rules (e.g. route, + /// firewall, load balancing, etc.). + /// + /// * Label keys must be between 1 and 63 characters long and must conform to + /// the following regular expression: `\[a-z][a-z0-9_-\]{0,62}`. + /// * Label values must be between 0 and 63 characters long and must conform + /// to the regular expression `\[a-z0-9_-\]{0,63}`. + /// * No more than 64 labels can be associated with a given resource. + /// + /// See for more information on and examples of labels. + /// + /// If you plan to use labels in your own code, please note that additional + /// characters may be allowed in the future. Therefore, you are advised to use + /// an internal label representation, such as JSON, which doesn't rely upon + /// specific characters being disallowed. For example, representing labels + /// as the string: name + "_" + value would prove problematic if we were to + /// allow "_" in a future release. + #[prost(map="string, string", tag="8")] + pub labels: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// etag is used for optimistic concurrency control as a way + /// to help prevent simultaneous updates of a instance config from overwriting + /// each other. It is strongly suggested that systems make use of the etag in + /// the read-modify-write cycle to perform instance config updates in order to + /// avoid race conditions: An etag is returned in the response which contains + /// instance configs, and systems are expected to put that etag in the request + /// to update instance config to ensure that their change will be applied to + /// the same version of the instance config. + /// If no etag is provided in the call to update instance config, then the + /// existing instance config is overwritten blindly. + #[prost(string, tag="9")] + pub etag: ::prost::alloc::string::String, /// Allowed values of the "default_leader" schema option for databases in /// instances that use this instance configuration. #[prost(string, repeated, tag="4")] pub leader_options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Output only. If true, the instance config is being created or updated. If + /// false, there are no ongoing operations for the instance config. + #[prost(bool, tag="10")] + pub reconciling: bool, + /// Output only. The current instance config state. + #[prost(enumeration="instance_config::State", tag="11")] + pub state: i32, +} +/// Nested message and enum types in `InstanceConfig`. +pub mod instance_config { + /// The type of this configuration. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Type { + /// Unspecified. + Unspecified = 0, + /// Google managed configuration. + GoogleManaged = 1, + /// User managed configuration. + UserManaged = 2, + } + impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::GoogleManaged => "GOOGLE_MANAGED", + Type::UserManaged => "USER_MANAGED", + } + } + } + /// Indicates the current state of the instance config. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum State { + /// Not specified. + Unspecified = 0, + /// The instance config is still being created. + Creating = 1, + /// The instance config is fully created and ready to be used to create + /// instances. + Ready = 2, + } + impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::Unspecified => "STATE_UNSPECIFIED", + State::Creating => "CREATING", + State::Ready => "READY", + } + } + } } /// An isolated set of Cloud Spanner resources on which databases can be hosted. #[derive(Clone, PartialEq, ::prost::Message)] @@ -122,10 +246,10 @@ pub struct Instance { #[prost(int32, tag="9")] pub processing_units: i32, /// Output only. The current instance state. For - /// \[CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance\], the state must be - /// either omitted or set to `CREATING`. For - /// \[UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance\], the state must be - /// either omitted or set to `READY`. + /// \[CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance\], + /// the state must be either omitted or set to `CREATING`. For + /// \[UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance\], + /// the state must be either omitted or set to `READY`. #[prost(enumeration="instance::State", tag="6")] pub state: i32, /// Cloud Labels are a flexible and lightweight mechanism for organizing cloud @@ -191,7 +315,8 @@ pub mod instance { } } } -/// The request for \[ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs\]. +/// The request for +/// \[ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListInstanceConfigsRequest { /// Required. The name of the project for which a list of supported instance @@ -205,19 +330,21 @@ pub struct ListInstanceConfigsRequest { pub page_size: i32, /// If non-empty, `page_token` should contain a /// \[next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigsResponse.next_page_token\] - /// from a previous \[ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse\]. + /// from a previous + /// \[ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse\]. #[prost(string, tag="3")] pub page_token: ::prost::alloc::string::String, } -/// The response for \[ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs\]. +/// The response for +/// \[ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListInstanceConfigsResponse { /// The list of requested instance configurations. #[prost(message, repeated, tag="1")] pub instance_configs: ::prost::alloc::vec::Vec, /// `next_page_token` can be sent in a subsequent - /// \[ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs\] call to - /// fetch more of the matching instance configurations. + /// \[ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs\] + /// call to fetch more of the matching instance configurations. #[prost(string, tag="2")] pub next_page_token: ::prost::alloc::string::String, } @@ -230,20 +357,179 @@ pub struct GetInstanceConfigRequest { #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, } -/// The request for \[GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance\]. +/// The request for +/// \[CreateInstanceConfigRequest][InstanceAdmin.CreateInstanceConfigRequest\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateInstanceConfigRequest { + /// Required. The name of the project in which to create the instance config. + /// Values are of the form `projects/`. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// Required. The ID of the instance config to create. Valid identifiers are + /// of the form `custom-\[-a-z0-9]*[a-z0-9\]` and must be between 2 and 64 + /// characters in length. The `custom-` prefix is required to avoid name + /// conflicts with Google managed configurations. + #[prost(string, tag="2")] + pub instance_config_id: ::prost::alloc::string::String, + /// Required. The InstanceConfig proto of the configuration to create. + /// instance_config.name must be + /// `/instanceConfigs/`. + /// instance_config.base_config must be a Google managed configuration name, + /// e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. + #[prost(message, optional, tag="3")] + pub instance_config: ::core::option::Option, + /// An option to validate, but not actually execute, a request, + /// and provide the same response. + #[prost(bool, tag="4")] + pub validate_only: bool, +} +/// The request for +/// \[UpdateInstanceConfigRequest][InstanceAdmin.UpdateInstanceConfigRequest\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateInstanceConfigRequest { + /// Required. The user instance config to update, which must always include the + /// instance config name. Otherwise, only fields mentioned in + /// \[update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask\] + /// need be included. To prevent conflicts of concurrent updates, + /// \[etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling\] can + /// be used. + #[prost(message, optional, tag="1")] + pub instance_config: ::core::option::Option, + /// Required. A mask specifying which fields in + /// \[InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig\] should be + /// updated. The field mask must always be specified; this prevents any future + /// fields in \[InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig\] + /// from being erased accidentally by clients that do not know about them. Only + /// display_name and labels can be updated. + #[prost(message, optional, tag="2")] + pub update_mask: ::core::option::Option<::prost_types::FieldMask>, + /// An option to validate, but not actually execute, a request, + /// and provide the same response. + #[prost(bool, tag="3")] + pub validate_only: bool, +} +/// The request for +/// \[DeleteInstanceConfigRequest][InstanceAdmin.DeleteInstanceConfigRequest\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteInstanceConfigRequest { + /// Required. The name of the instance configuration to be deleted. + /// Values are of the form + /// `projects//instanceConfigs/` + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Used for optimistic concurrency control as a way to help prevent + /// simultaneous deletes of an instance config from overwriting each + /// other. If not empty, the API + /// only deletes the instance config when the etag provided matches the current + /// status of the requested instance config. Otherwise, deletes the instance + /// config without checking the current status of the requested instance + /// config. + #[prost(string, tag="2")] + pub etag: ::prost::alloc::string::String, + /// An option to validate, but not actually execute, a request, + /// and provide the same response. + #[prost(bool, tag="3")] + pub validate_only: bool, +} +/// The request for +/// \[ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListInstanceConfigOperationsRequest { + /// Required. The project of the instance config operations. + /// Values are of the form `projects/`. + #[prost(string, tag="1")] + pub parent: ::prost::alloc::string::String, + /// An expression that filters the list of returned operations. + /// + /// A filter expression consists of a field name, a + /// comparison operator, and a value for filtering. + /// The value must be a string, a number, or a boolean. The comparison operator + /// must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + /// Colon `:` is the contains operator. Filter rules are not case sensitive. + /// + /// The following fields in the \[Operation][google.longrunning.Operation\] + /// are eligible for filtering: + /// + /// * `name` - The name of the long-running operation + /// * `done` - False if the operation is in progress, else true. + /// * `metadata.@type` - the type of metadata. For example, the type string + /// for + /// \[CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata\] + /// is + /// `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + /// * `metadata.` - any field in metadata.value. + /// `metadata.@type` must be specified first, if filtering on metadata + /// fields. + /// * `error` - Error associated with the long-running operation. + /// * `response.@type` - the type of response. + /// * `response.` - any field in response.value. + /// + /// You can combine multiple expressions by enclosing each expression in + /// parentheses. By default, expressions are combined with AND logic. However, + /// you can specify AND, OR, and NOT logic explicitly. + /// + /// Here are a few examples: + /// + /// * `done:true` - The operation is complete. + /// * `(metadata.@type=` \ + /// `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + /// AND` \ + /// `(metadata.instance_config.name:custom-config) AND` \ + /// `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + /// `(error:*)` - Return operations where: + /// * The operation's metadata type is + /// \[CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata\]. + /// * The instance config name contains "custom-config". + /// * The operation started before 2021-03-28T14:50:00Z. + /// * The operation resulted in an error. + #[prost(string, tag="2")] + pub filter: ::prost::alloc::string::String, + /// Number of operations to be returned in the response. If 0 or + /// less, defaults to the server's maximum allowed page size. + #[prost(int32, tag="3")] + pub page_size: i32, + /// If non-empty, `page_token` should contain a + /// \[next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse.next_page_token\] + /// from a previous + /// \[ListInstanceConfigOperationsResponse][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse\] + /// to the same `parent` and with the same `filter`. + #[prost(string, tag="4")] + pub page_token: ::prost::alloc::string::String, +} +/// The response for +/// \[ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListInstanceConfigOperationsResponse { + /// The list of matching instance config [long-running + /// operations]\[google.longrunning.Operation\]. Each operation's name will be + /// prefixed by the instance config's name. The operation's + /// \[metadata][google.longrunning.Operation.metadata\] field type + /// `metadata.type_url` describes the type of the metadata. + #[prost(message, repeated, tag="1")] + pub operations: ::prost::alloc::vec::Vec, + /// `next_page_token` can be sent in a subsequent + /// \[ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations\] + /// call to fetch more of the matching metadata. + #[prost(string, tag="2")] + pub next_page_token: ::prost::alloc::string::String, +} +/// The request for +/// \[GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetInstanceRequest { /// Required. The name of the requested instance. Values are of the form /// `projects//instances/`. #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, - /// If field_mask is present, specifies the subset of \[Instance][google.spanner.admin.instance.v1.Instance\] fields that - /// should be returned. - /// If absent, all \[Instance][google.spanner.admin.instance.v1.Instance\] fields are returned. + /// If field_mask is present, specifies the subset of + /// \[Instance][google.spanner.admin.instance.v1.Instance\] fields that should be + /// returned. If absent, all + /// \[Instance][google.spanner.admin.instance.v1.Instance\] fields are returned. #[prost(message, optional, tag="2")] pub field_mask: ::core::option::Option<::prost_types::FieldMask>, } -/// The request for \[CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance\]. +/// The request for +/// \[CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateInstanceRequest { /// Required. The name of the project in which to create the instance. Values @@ -260,7 +546,8 @@ pub struct CreateInstanceRequest { #[prost(message, optional, tag="3")] pub instance: ::core::option::Option, } -/// The request for \[ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances\]. +/// The request for +/// \[ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListInstancesRequest { /// Required. The name of the project for which a list of instances is @@ -272,8 +559,9 @@ pub struct ListInstancesRequest { #[prost(int32, tag="2")] pub page_size: i32, /// If non-empty, `page_token` should contain a - /// \[next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token\] from a - /// previous \[ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse\]. + /// \[next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token\] + /// from a previous + /// \[ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse\]. #[prost(string, tag="3")] pub page_token: ::prost::alloc::string::String, /// An expression for filtering the results of the request. Filter rules are @@ -298,33 +586,39 @@ pub struct ListInstancesRequest { #[prost(string, tag="4")] pub filter: ::prost::alloc::string::String, } -/// The response for \[ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances\]. +/// The response for +/// \[ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListInstancesResponse { /// The list of requested instances. #[prost(message, repeated, tag="1")] pub instances: ::prost::alloc::vec::Vec, /// `next_page_token` can be sent in a subsequent - /// \[ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances\] call to fetch more - /// of the matching instances. + /// \[ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances\] + /// call to fetch more of the matching instances. #[prost(string, tag="2")] pub next_page_token: ::prost::alloc::string::String, } -/// The request for \[UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance\]. +/// The request for +/// \[UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateInstanceRequest { /// Required. The instance to update, which must always include the instance - /// name. Otherwise, only fields mentioned in \[field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask\] need be included. + /// name. Otherwise, only fields mentioned in + /// \[field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask\] + /// need be included. #[prost(message, optional, tag="1")] pub instance: ::core::option::Option, - /// Required. A mask specifying which fields in \[Instance][google.spanner.admin.instance.v1.Instance\] should be updated. + /// Required. A mask specifying which fields in + /// \[Instance][google.spanner.admin.instance.v1.Instance\] should be updated. /// The field mask must always be specified; this prevents any future fields in - /// \[Instance][google.spanner.admin.instance.v1.Instance\] from being erased accidentally by clients that do not know - /// about them. + /// \[Instance][google.spanner.admin.instance.v1.Instance\] from being erased + /// accidentally by clients that do not know about them. #[prost(message, optional, tag="2")] pub field_mask: ::core::option::Option<::prost_types::FieldMask>, } -/// The request for \[DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance\]. +/// The request for +/// \[DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteInstanceRequest { /// Required. The name of the instance to be deleted. Values are of the form @@ -340,8 +634,8 @@ pub struct CreateInstanceMetadata { #[prost(message, optional, tag="1")] pub instance: ::core::option::Option, /// The time at which the - /// \[CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance\] request was - /// received. + /// \[CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance\] + /// request was received. #[prost(message, optional, tag="2")] pub start_time: ::core::option::Option<::prost_types::Timestamp>, /// The time at which this operation was cancelled. If set, this operation is @@ -360,7 +654,8 @@ pub struct UpdateInstanceMetadata { /// The desired end state of the update. #[prost(message, optional, tag="1")] pub instance: ::core::option::Option, - /// The time at which \[UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance\] + /// The time at which + /// \[UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance\] /// request was received. #[prost(message, optional, tag="2")] pub start_time: ::core::option::Option<::prost_types::Timestamp>, @@ -373,6 +668,38 @@ pub struct UpdateInstanceMetadata { #[prost(message, optional, tag="4")] pub end_time: ::core::option::Option<::prost_types::Timestamp>, } +/// Metadata type for the operation returned by +/// \[CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateInstanceConfigMetadata { + /// The target instance config end state. + #[prost(message, optional, tag="1")] + pub instance_config: ::core::option::Option, + /// The progress of the + /// \[CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig\] + /// operation. + #[prost(message, optional, tag="2")] + pub progress: ::core::option::Option, + /// The time at which this operation was cancelled. + #[prost(message, optional, tag="3")] + pub cancel_time: ::core::option::Option<::prost_types::Timestamp>, +} +/// Metadata type for the operation returned by +/// \[UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig\]. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateInstanceConfigMetadata { + /// The desired instance config after updating. + #[prost(message, optional, tag="1")] + pub instance_config: ::core::option::Option, + /// The progress of the + /// \[UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig\] + /// operation. + #[prost(message, optional, tag="2")] + pub progress: ::core::option::Option, + /// The time at which this operation was cancelled. + #[prost(message, optional, tag="3")] + pub cancel_time: ::core::option::Option<::prost_types::Timestamp>, +} /// Generated client implementations. pub mod instance_admin_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] @@ -503,6 +830,195 @@ pub mod instance_admin_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Creates an instance config and begins preparing it to be used. The + /// returned [long-running operation][google.longrunning.Operation] + /// can be used to track the progress of preparing the new + /// instance config. The instance config name is assigned by the caller. If the + /// named instance config already exists, `CreateInstanceConfig` returns + /// `ALREADY_EXISTS`. + /// + /// Immediately after the request returns: + /// + /// * The instance config is readable via the API, with all requested + /// attributes. The instance config's + /// [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] + /// field is set to true. Its state is `CREATING`. + /// + /// While the operation is pending: + /// + /// * Cancelling the operation renders the instance config immediately + /// unreadable via the API. + /// * Except for deleting the creating resource, all other attempts to modify + /// the instance config are rejected. + /// + /// Upon completion of the returned operation: + /// + /// * Instances can be created using the instance configuration. + /// * The instance config's + /// [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] + /// field becomes false. Its state becomes `READY`. + /// + /// The returned [long-running operation][google.longrunning.Operation] will + /// have a name of the format + /// `/operations/` and can be used to track + /// creation of the instance config. The + /// [metadata][google.longrunning.Operation.metadata] field type is + /// [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + /// The [response][google.longrunning.Operation.response] field type is + /// [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if + /// successful. + /// + /// Authorization requires `spanner.instanceConfigs.create` permission on + /// the resource + /// [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent]. + pub async fn create_instance_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.spanner.admin.instance.v1.InstanceAdmin/CreateInstanceConfig", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Updates an instance config. The returned + /// [long-running operation][google.longrunning.Operation] can be used to track + /// the progress of updating the instance. If the named instance config does + /// not exist, returns `NOT_FOUND`. + /// + /// Only user managed configurations can be updated. + /// + /// Immediately after the request returns: + /// + /// * The instance config's + /// [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] + /// field is set to true. + /// + /// While the operation is pending: + /// + /// * Cancelling the operation sets its metadata's + /// [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. + /// The operation is guaranteed to succeed at undoing all changes, after + /// which point it terminates with a `CANCELLED` status. + /// * All other attempts to modify the instance config are rejected. + /// * Reading the instance config via the API continues to give the + /// pre-request values. + /// + /// Upon completion of the returned operation: + /// + /// * Creating instances using the instance configuration uses the new + /// values. + /// * The instance config's new values are readable via the API. + /// * The instance config's + /// [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] + /// field becomes false. + /// + /// The returned [long-running operation][google.longrunning.Operation] will + /// have a name of the format + /// `/operations/` and can be used to track + /// the instance config modification. The + /// [metadata][google.longrunning.Operation.metadata] field type is + /// [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. + /// The [response][google.longrunning.Operation.response] field type is + /// [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if + /// successful. + /// + /// Authorization requires `spanner.instanceConfigs.update` permission on + /// the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name]. + pub async fn update_instance_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.spanner.admin.instance.v1.InstanceAdmin/UpdateInstanceConfig", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Deletes the instance config. Deletion is only allowed when no + /// instances are using the configuration. If any instances are using + /// the config, returns `FAILED_PRECONDITION`. + /// + /// Only user managed configurations can be deleted. + /// + /// Authorization requires `spanner.instanceConfigs.delete` permission on + /// the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name]. + pub async fn delete_instance_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.spanner.admin.instance.v1.InstanceAdmin/DeleteInstanceConfig", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// Lists the user-managed instance config [long-running + /// operations][google.longrunning.Operation] in the given project. An instance + /// config operation has a name of the form + /// `projects//instanceConfigs//operations/`. + /// The long-running operation + /// [metadata][google.longrunning.Operation.metadata] field type + /// `metadata.type_url` describes the type of the metadata. Operations returned + /// include those that have completed/failed/canceled within the last 7 days, + /// and pending operations. Operations returned are ordered by + /// `operation.metadata.value.start_time` in descending order starting + /// from the most recently started operation. + pub async fn list_instance_config_operations( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.spanner.admin.instance.v1.InstanceAdmin/ListInstanceConfigOperations", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Lists all instances in the given project. pub async fn list_instances( &mut self, @@ -613,9 +1129,9 @@ pub mod instance_admin_client { /// Until completion of the returned operation: /// /// * Cancelling the operation sets its metadata's - /// [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins - /// restoring resources to their pre-request values. The operation - /// is guaranteed to succeed at undoing all resource changes, + /// [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], + /// and begins restoring resources to their pre-request values. The + /// operation is guaranteed to succeed at undoing all resource changes, /// after which point it terminates with a `CANCELLED` status. /// * All other attempts to modify the instance are rejected. /// * Reading the instance via the API continues to give the pre-request diff --git a/gcloud-sdk/genproto/google.storagetransfer.v1.rs b/gcloud-sdk/genproto/google.storagetransfer.v1.rs index 785568e21..4882f6ce4 100644 --- a/gcloud-sdk/genproto/google.storagetransfer.v1.rs +++ b/gcloud-sdk/genproto/google.storagetransfer.v1.rs @@ -291,6 +291,170 @@ pub struct PosixFilesystem { #[prost(string, tag="1")] pub root_directory: ::prost::alloc::string::String, } +/// An AwsS3CompatibleData resource. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AwsS3CompatibleData { + /// Required. Specifies the name of the bucket. + #[prost(string, tag="1")] + pub bucket_name: ::prost::alloc::string::String, + /// Specifies the root path to transfer objects. + /// + /// Must be an empty string or full path name that ends with a '/'. This + /// field is treated as an object prefix. As such, it should generally not + /// begin with a '/'. + #[prost(string, tag="2")] + pub path: ::prost::alloc::string::String, + /// Required. Specifies the endpoint of the storage service. + #[prost(string, tag="3")] + pub endpoint: ::prost::alloc::string::String, + /// Specifies the region to sign requests with. This can be left blank if + /// requests should be signed with an empty region. + #[prost(string, tag="5")] + pub region: ::prost::alloc::string::String, + /// Specifies the metadata of the S3 compatible data provider. Each provider + /// may contain some attributes that do not apply to all S3-compatible data + /// providers. When not specified, S3CompatibleMetadata is used by default. + #[prost(oneof="aws_s3_compatible_data::DataProvider", tags="4")] + pub data_provider: ::core::option::Option, +} +/// Nested message and enum types in `AwsS3CompatibleData`. +pub mod aws_s3_compatible_data { + /// Specifies the metadata of the S3 compatible data provider. Each provider + /// may contain some attributes that do not apply to all S3-compatible data + /// providers. When not specified, S3CompatibleMetadata is used by default. + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum DataProvider { + /// A S3 compatible metadata. + #[prost(message, tag="4")] + S3Metadata(super::S3CompatibleMetadata), + } +} +/// S3CompatibleMetadata contains the metadata fields that apply to the basic +/// types of S3-compatible data providers. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct S3CompatibleMetadata { + /// Specifies the authentication and authorization method used by the storage + /// service. When not specified, Transfer Service will attempt to determine + /// right auth method to use. + #[prost(enumeration="s3_compatible_metadata::AuthMethod", tag="1")] + pub auth_method: i32, + /// Specifies the API request model used to call the storage service. When not + /// specified, the default value of RequestModel + /// REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. + #[prost(enumeration="s3_compatible_metadata::RequestModel", tag="2")] + pub request_model: i32, + /// Specifies the network protocol of the agent. When not specified, the + /// default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. + #[prost(enumeration="s3_compatible_metadata::NetworkProtocol", tag="3")] + pub protocol: i32, + /// The Listing API to use for discovering objects. When not specified, + /// Transfer Service will attempt to determine the right API to use. + #[prost(enumeration="s3_compatible_metadata::ListApi", tag="4")] + pub list_api: i32, +} +/// Nested message and enum types in `S3CompatibleMetadata`. +pub mod s3_compatible_metadata { + /// The authentication and authorization method used by the storage service. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum AuthMethod { + /// AuthMethod is not specified. + Unspecified = 0, + /// Auth requests with AWS SigV4. + AwsSignatureV4 = 1, + /// Auth requests with AWS SigV2. + AwsSignatureV2 = 2, + } + impl AuthMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthMethod::Unspecified => "AUTH_METHOD_UNSPECIFIED", + AuthMethod::AwsSignatureV4 => "AUTH_METHOD_AWS_SIGNATURE_V4", + AuthMethod::AwsSignatureV2 => "AUTH_METHOD_AWS_SIGNATURE_V2", + } + } + } + /// The request model of the API. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum RequestModel { + /// RequestModel is not specified. + Unspecified = 0, + /// Perform requests using Virtual Hosted Style. + /// Example: + VirtualHostedStyle = 1, + /// Perform requests using Path Style. + /// Example: + PathStyle = 2, + } + impl RequestModel { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RequestModel::Unspecified => "REQUEST_MODEL_UNSPECIFIED", + RequestModel::VirtualHostedStyle => "REQUEST_MODEL_VIRTUAL_HOSTED_STYLE", + RequestModel::PathStyle => "REQUEST_MODEL_PATH_STYLE", + } + } + } + /// The agent network protocol to access the storage service. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum NetworkProtocol { + /// NetworkProtocol is not specified. + Unspecified = 0, + /// Perform requests using HTTPS. + Https = 1, + /// Not recommended: This sends data in clear-text. This is only + /// appropriate within a closed network or for publicly available data. + /// Perform requests using HTTP. + Http = 2, + } + impl NetworkProtocol { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + NetworkProtocol::Unspecified => "NETWORK_PROTOCOL_UNSPECIFIED", + NetworkProtocol::Https => "NETWORK_PROTOCOL_HTTPS", + NetworkProtocol::Http => "NETWORK_PROTOCOL_HTTP", + } + } + } + /// The Listing API to use for discovering objects. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum ListApi { + /// ListApi is not specified. + Unspecified = 0, + /// Perform listing using ListObjectsV2 API. + ListObjectsV2 = 1, + /// Legacy ListObjects API. + ListObjects = 2, + } + impl ListApi { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListApi::Unspecified => "LIST_API_UNSPECIFIED", + ListApi::ListObjectsV2 => "LIST_OBJECTS_V2", + ListApi::ListObjects => "LIST_OBJECTS", + } + } + } +} /// Represents an On-Premises Agent pool. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AgentPool { @@ -373,13 +537,12 @@ pub struct TransferOptions { /// exclusive. #[prost(bool, tag="3")] pub delete_objects_from_source_after_transfer: bool, - /// When to overwrite objects that already exist in the sink. If not set + /// When to overwrite objects that already exist in the sink. If not set, /// overwrite behavior is determined by /// \[overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink\]. #[prost(enumeration="transfer_options::OverwriteWhen", tag="4")] pub overwrite_when: i32, - /// Represents the selected metadata options for a transfer job. This feature - /// is in Preview. + /// Represents the selected metadata options for a transfer job. #[prost(message, optional, tag="5")] pub metadata_options: ::core::option::Option, } @@ -390,14 +553,16 @@ pub mod transfer_options { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum OverwriteWhen { - /// Indicate the option is not set. + /// Overwrite behavior is unspecified. Unspecified = 0, - /// Overwrite destination object with source if the two objects are - /// different. + /// Overwrites destination objects with the source objects, only if the + /// objects have the same name but different HTTP ETags or checksum values. Different = 1, - /// Never overwrite destination object. + /// Never overwrites a destination object if a source object has the + /// same name. In this case, the source object is not transferred. Never = 2, - /// Always overwrite destination object. + /// Always overwrite the destination object with the source object, even if + /// the HTTP Etags or checksum values are the same. Always = 3, } impl OverwriteWhen { @@ -447,7 +612,7 @@ pub struct TransferSpec { #[prost(oneof="transfer_spec::DataSink", tags="4, 13")] pub data_sink: ::core::option::Option, /// The read source of the data. - #[prost(oneof="transfer_spec::DataSource", tags="1, 2, 3, 14, 8")] + #[prost(oneof="transfer_spec::DataSource", tags="1, 2, 3, 14, 8, 19")] pub data_source: ::core::option::Option, /// Represents a supported data container type which is required for transfer /// jobs which needs a data source, a data sink and an intermediate location to @@ -485,6 +650,9 @@ pub mod transfer_spec { /// An Azure Blob Storage data source. #[prost(message, tag="8")] AzureBlobStorageDataSource(super::AzureBlobStorageData), + /// An AWS S3 compatible data source. + #[prost(message, tag="19")] + AwsS3CompatibleDataSource(super::AwsS3CompatibleData), } /// Represents a supported data container type which is required for transfer /// jobs which needs a data source, a data sink and an intermediate location to @@ -1377,7 +1545,7 @@ pub struct UpdateTransferJobRequest { /// other fields are rejected with the error /// \[INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT\]. Updating a job status /// to \[DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED\] requires - /// `storagetransfer.jobs.delete` permissions. + /// `storagetransfer.jobs.delete` permission. #[prost(message, optional, tag="3")] pub transfer_job: ::core::option::Option, /// The field mask of the fields in `transferJob` that are to be updated in @@ -1404,6 +1572,17 @@ pub struct GetTransferJobRequest { #[prost(string, tag="2")] pub project_id: ::prost::alloc::string::String, } +/// Request passed to DeleteTransferJob. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteTransferJobRequest { + /// Required. The job to delete. + #[prost(string, tag="1")] + pub job_name: ::prost::alloc::string::String, + /// Required. The ID of the Google Cloud project that owns the + /// job. + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, +} /// `projectId`, `jobNames`, and `jobStatuses` are query parameters that can /// be specified when listing transfer jobs. #[derive(Clone, PartialEq, ::prost::Message)] @@ -1816,6 +1995,27 @@ pub mod storage_transfer_service_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// Deletes a transfer job. Deleting a transfer job sets its status to + /// [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. + pub async fn delete_transfer_job( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/google.storagetransfer.v1.StorageTransferService/DeleteTransferJob", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// Creates an agent pool resource. pub async fn create_agent_pool( &mut self, diff --git a/gcloud-sdk/genproto/maps.fleetengine.delivery.v1.rs b/gcloud-sdk/genproto/maps.fleetengine.delivery.v1.rs index b87b37e0c..8077b7952 100644 --- a/gcloud-sdk/genproto/maps.fleetengine.delivery.v1.rs +++ b/gcloud-sdk/genproto/maps.fleetengine.delivery.v1.rs @@ -799,7 +799,12 @@ pub struct ListDeliveryVehiclesRequest { /// /// Note that the only queries supported for `ListDeliveryVehicles` are /// on vehicle attributes (for example, `attributes. = ` or - /// `attributes. = AND attributes. = `). + /// `attributes. = AND attributes. = `). Also, all + /// attributes are stored as strings, so the only supported comparisons against + /// attributes are string comparisons. In order to compare against number or + /// boolean values, the values must be explicitly quoted to be treated as + /// strings (for example, `attributes. = "10"` or + /// `attributes. = "true"`). #[prost(string, tag="6")] pub filter: ::prost::alloc::string::String, /// Optional. A filter that limits the search area to a rectangle defined by the diff --git a/gcloud-sdk/src/api_client.rs b/gcloud-sdk/src/api_client.rs index f5f718871..cfe2ff841 100644 --- a/gcloud-sdk/src/api_client.rs +++ b/gcloud-sdk/src/api_client.rs @@ -18,6 +18,7 @@ where fn create_client(&self, channel: GoogleAuthMiddlewareService) -> C; } +#[derive(Clone)] pub struct GoogleApiClient where B: GoogleApiClientBuilder, @@ -73,6 +74,7 @@ where } } +#[derive(Clone)] pub struct GoogleApiClientBuilderFunction where C: Clone + Send + Sync, diff --git a/gcloud-sdk/src/google_apis.rs b/gcloud-sdk/src/google_apis.rs index f289291a5..87cff3259 100644 --- a/gcloud-sdk/src/google_apis.rs +++ b/gcloud-sdk/src/google_apis.rs @@ -308,6 +308,7 @@ pub mod google { feature = "google-cloud-beyondcorp-appgateways-v1", feature = "google-cloud-beyondcorp-clientconnectorservices-v1", feature = "google-cloud-beyondcorp-clientgateways-v1", + feature = "google-cloud-bigquery-analyticshub-v1", feature = "google-cloud-bigquery-connection-v1", feature = "google-cloud-bigquery-connection-v1beta1", feature = "google-cloud-bigquery-dataexchange-v1beta1", @@ -338,6 +339,7 @@ pub mod google { feature = "google-cloud-compute-v1small", feature = "google-cloud-connectors-v1", feature = "google-cloud-contactcenterinsights-v1", + feature = "google-cloud-contentwarehouse-v1", feature = "google-cloud-datacatalog-v1", feature = "google-cloud-datacatalog-v1beta1", feature = "google-cloud-dataform-v1alpha2", @@ -555,6 +557,7 @@ pub mod google { feature = "google-identity-accesscontextmanager-v1", feature = "google-logging-v2", feature = "google-longrunning", + feature = "google-maps-addressvalidation-v1", feature = "google-maps-mapsplatformdatasets-v1alpha", feature = "google-maps-playablelocations-v3", feature = "google-maps-playablelocations-v3-sample", @@ -1059,6 +1062,12 @@ pub mod google { } } pub mod bigquery { + pub mod analyticshub { + pub mod v1 { + #[cfg(any(feature = "google-cloud-bigquery-analyticshub-v1"))] + include_proto!("google.cloud.bigquery.analyticshub.v1"); + } + } pub mod connection { pub mod v1 { #[cfg(any(feature = "google-cloud-bigquery-connection-v1"))] @@ -1243,6 +1252,12 @@ pub mod google { include_proto!("google.cloud.contactcenterinsights.v1"); } } + pub mod contentwarehouse { + pub mod v1 { + #[cfg(any(feature = "google-cloud-contentwarehouse-v1"))] + include_proto!("google.cloud.contentwarehouse.v1"); + } + } pub mod datacatalog { pub mod v1 { #[cfg(any(feature = "google-cloud-datacatalog-v1"))] @@ -1339,7 +1354,12 @@ pub mod google { } pub mod documentai { pub mod v1 { - #[cfg(any(feature = "google-cloud-documentai-v1"))] + #[cfg( + any( + feature = "google-cloud-contentwarehouse-v1", + feature = "google-cloud-documentai-v1", + ) + )] include_proto!("google.cloud.documentai.v1"); } pub mod v1beta1 { @@ -1599,6 +1619,12 @@ pub mod google { include_proto!("google.cloud.gsuiteaddons.v1"); } } + pub mod healthcare { + pub mod logging { + #[cfg(any(feature = "google-cloud-healthcare-logging"))] + include_proto!("google.cloud.healthcare.logging"); + } + } pub mod iap { pub mod v1 { #[cfg(any(feature = "google-cloud-iap-v1"))] @@ -1620,6 +1646,12 @@ pub mod google { } } pub mod ids { + pub mod logging { + pub mod v1 { + #[cfg(any(feature = "google-cloud-ids-logging-v1"))] + include_proto!("google.cloud.ids.logging.v1"); + } + } pub mod v1 { #[cfg(any(feature = "google-cloud-ids-v1"))] include_proto!("google.cloud.ids.v1"); @@ -2566,6 +2598,7 @@ pub mod google { #[cfg( any( feature = "google-geo-type", + feature = "google-maps-addressvalidation-v1", feature = "google-maps-routes-v1", feature = "google-maps-routes-v1alpha", feature = "google-maps-routing-v2", @@ -2614,12 +2647,14 @@ pub mod google { feature = "google-cloud-asset-v1p5beta1", feature = "google-cloud-asset-v1p7beta1", feature = "google-cloud-audit", + feature = "google-cloud-bigquery-analyticshub-v1", feature = "google-cloud-bigquery-connection-v1", feature = "google-cloud-bigquery-connection-v1beta1", feature = "google-cloud-bigquery-dataexchange-v1beta1", feature = "google-cloud-bigquery-datapolicies-v1beta1", feature = "google-cloud-bigquery-logging-v1", feature = "google-cloud-billing-v1", + feature = "google-cloud-contentwarehouse-v1", feature = "google-cloud-datacatalog-v1", feature = "google-cloud-datacatalog-v1beta1", feature = "google-cloud-datafusion-v1beta1", @@ -2885,6 +2920,12 @@ pub mod google { include_proto!("google.longrunning"); } pub mod maps { + pub mod addressvalidation { + pub mod v1 { + #[cfg(any(feature = "google-maps-addressvalidation-v1"))] + include_proto!("google.maps.addressvalidation.v1"); + } + } pub mod mapsplatformdatasets { pub mod v1alpha { #[cfg(any(feature = "google-maps-mapsplatformdatasets-v1alpha"))] @@ -3018,6 +3059,7 @@ pub mod google { feature = "google-cloud-asset-v1p5beta1", feature = "google-cloud-asset-v1p7beta1", feature = "google-cloud-audit", + feature = "google-cloud-bigquery-analyticshub-v1", feature = "google-cloud-bigquery-connection-v1", feature = "google-cloud-bigquery-connection-v1beta1", feature = "google-cloud-bigquery-dataexchange-v1beta1", @@ -3027,6 +3069,7 @@ pub mod google { feature = "google-cloud-billing-budgets-v1beta1", feature = "google-cloud-billing-v1", feature = "google-cloud-channel-v1", + feature = "google-cloud-contentwarehouse-v1", feature = "google-cloud-datacatalog-v1", feature = "google-cloud-datacatalog-v1beta1", feature = "google-cloud-dataform-v1alpha2", @@ -3113,6 +3156,7 @@ pub mod google { feature = "google-iam-v2", feature = "google-iam-v2beta", feature = "google-identity-accesscontextmanager-v1", + feature = "google-maps-addressvalidation-v1", feature = "google-maps-playablelocations-v3", feature = "google-maps-playablelocations-v3-sample", feature = "google-maps-regionlookup-v1alpha", @@ -3197,6 +3241,7 @@ pub mod google { feature = "google-cloud-commerce-consumer-procurement-v1alpha1", feature = "google-cloud-connectors-v1", feature = "google-cloud-contactcenterinsights-v1", + feature = "google-cloud-contentwarehouse-v1", feature = "google-cloud-datafusion-v1", feature = "google-cloud-datafusion-v1beta1", feature = "google-cloud-datalabeling-v1beta1", @@ -3236,6 +3281,7 @@ pub mod google { feature = "google-cloud-gkehub-v1beta1", feature = "google-cloud-gkemulticloud-v1", feature = "google-cloud-gsuiteaddons-logging-v1", + feature = "google-cloud-healthcare-logging", feature = "google-cloud-identitytoolkit-logging", feature = "google-cloud-ids-v1", feature = "google-cloud-iot-v1",