├── .gitignore ├── googapis ├── LICENSE-MIT ├── LICENSE-APACHE ├── genproto │ ├── google.protobuf.rs │ ├── google.iam.v1.logging.rs │ ├── google.cloud.gkehub.multiclusteringress.v1.rs │ ├── google.search.partnerdataingestion.logging.v1.rs │ ├── google.cloud.gkehub.metering.v1alpha.rs │ ├── google.cloud.gkehub.metering.v1beta.rs │ ├── google.appengine.legacy.rs │ ├── google.cloud.metastore.logging.v1.rs │ ├── google.cloud.gkehub.cloudauditlogging.v1alpha.rs │ ├── google.cloud.bigquery.migration.tasks.assessment.v2alpha.rs │ ├── google.cloud.gkehub.multiclusteringress.v1alpha.rs │ ├── google.cloud.gkehub.multiclusteringress.v1beta.rs │ ├── google.apps.script.r#type.docs.rs │ ├── google.apps.script.r#type.sheets.rs │ ├── google.apps.script.r#type.slides.rs │ ├── google.apps.script.r#type.drive.rs │ ├── google.cloud.aiplatform.logging.rs │ ├── google.cloud.gsuiteaddons.logging.v1.rs │ ├── google.cloud.rs │ ├── google.cloud.common.rs │ ├── google.geo.r#type.rs │ ├── google.cloud.secretmanager.logging.v1.rs │ ├── google.cloud.recommender.logging.v1.rs │ ├── google.cloud.recommender.logging.v1beta1.rs │ ├── google.identity.accesscontextmanager.r#type.rs │ ├── google.cloud.gkeconnect.gateway.v1.rs │ ├── google.cloud.gkeconnect.gateway.v1alpha1.rs │ ├── grafeas.v1beta1.deployment.rs │ ├── google.maps.unity.rs │ ├── google.cloud.saasaccelerator.management.logs.v1.rs │ ├── google.networking.trafficdirector.r#type.rs │ ├── google.cloud.oslogin.common.rs │ ├── grafeas.v1beta1.discovery.rs │ ├── google.gapic.metadata.rs │ ├── grafeas.v1beta1.build.rs │ ├── google.cloud.phishingprotection.v1beta1.rs │ ├── google.apps.script.r#type.calendar.rs │ ├── google.cloud.gkehub.servicemesh.v1alpha.rs │ ├── google.firestore.bundle.rs │ ├── google.actions.r#type.rs │ ├── grafeas.v1beta1.package.rs │ ├── google.logging.r#type.rs │ ├── grafeas.v1beta1.image.rs │ ├── google.cloud.aiplatform.v1.schema.predict.params.rs │ ├── google.cloud.aiplatform.v1beta1.schema.predict.params.rs │ ├── google.cloud.retail.logging.rs │ ├── google.cloud.iap.v1beta1.rs │ ├── google.apps.script.r#type.gmail.rs │ ├── google.cloud.gaming.allocationendpoint.v1alpha.rs │ ├── google.actions.sdk.v2.interactionmodel.r#type.rs │ ├── google.cloud.location.rs │ ├── grafeas.v1beta1.source.rs │ ├── google.firebase.fcm.connection.v1alpha1.rs │ ├── google.cloud.dataproc.logging.rs │ ├── google.cloud.gkeconnect.gateway.v1beta1.rs │ ├── google.cloud.workflows.r#type.rs │ ├── grafeas.v1beta1.provenance.rs │ ├── google.maps.roads.v1op.rs │ └── google.cloud.aiplatform.v1.schema.predict.instance.rs └── src │ └── lib.rs ├── .cargo └── config ├── Cargo.toml ├── examples └── spanner-admin │ ├── README.md │ ├── Cargo.toml │ └── src │ └── main.rs ├── .gitmodules ├── .github ├── renovate.json └── workflows │ ├── ci.yml │ └── doc.yml ├── xtask ├── Cargo.toml └── src │ └── main.rs ├── LICENSE-MIT └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | Cargo.lock 3 | -------------------------------------------------------------------------------- /googapis/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | ./../LICENSE-MIT -------------------------------------------------------------------------------- /googapis/LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | ./../LICENSE-APACHE -------------------------------------------------------------------------------- /googapis/genproto/google.protobuf.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.cargo/config: -------------------------------------------------------------------------------- 1 | [alias] 2 | xtask = "run --release --package xtask --bin xtask --" 3 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "googapis", 4 | "xtask", 5 | "examples/spanner-admin", 6 | ] 7 | -------------------------------------------------------------------------------- /examples/spanner-admin/README.md: -------------------------------------------------------------------------------- 1 | # spanner-admin 2 | 3 | ```bash 4 | PROJECT=your-project-id INSTANCE=your-spanner-instance cargo run 5 | ``` 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "xtask/proto/googleapis"] 2 | path = xtask/proto/googleapis 3 | url = https://github.com/googleapis/googleapis.git 4 | shallow = true 5 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "git-submodules": { 6 | "enabled": true 7 | }, 8 | "labels": ["B-renovate"], 9 | "timezone": "Asia/Tokyo", 10 | "schedule": ["before 5am"] 11 | } 12 | -------------------------------------------------------------------------------- /xtask/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "xtask" 3 | version = "0.1.0" 4 | authors = ["mechiru "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | tonic-build = { version = "0.6", default-features = false, features = ["rustfmt", "prost"] } 9 | prost-build = "0.9" 10 | -------------------------------------------------------------------------------- /googapis/genproto/google.iam.v1.logging.rs: -------------------------------------------------------------------------------- 1 | /// Audit log information specific to Cloud IAM. This message is serialized 2 | /// as an `Any` type in the `ServiceData` message of an 3 | /// `AuditLog` message. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct AuditData { 6 | /// Policy delta between the original policy and the newly set policy. 7 | #[prost(message, optional, tag = "2")] 8 | pub policy_delta: ::core::option::Option, 9 | } 10 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkehub.multiclusteringress.v1.rs: -------------------------------------------------------------------------------- 1 | /// **Multi-cluster Ingress**: The configuration for the MultiClusterIngress 2 | /// feature. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct FeatureSpec { 5 | /// Fully-qualified Membership name which hosts the MultiClusterIngress CRD. 6 | /// Example: `projects/foo-proj/locations/global/memberships/bar` 7 | #[prost(string, tag = "1")] 8 | pub config_membership: ::prost::alloc::string::String, 9 | } 10 | -------------------------------------------------------------------------------- /examples/spanner-admin/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "spanner-admin" 3 | version = "0.1.0" 4 | authors = ["mechiru "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | googapis = { path = "./../../googapis", default-features = false, features = ["google-spanner-admin-database-v1"] } 9 | gouth = "0.2.1" 10 | tonic = { version = "0.6.1", features = ["tls"] } 11 | prost = "0.9.0" 12 | prost-types = "0.9.0" 13 | tokio = { version = "1.13.0", features = ["rt-multi-thread", "time", "fs", "macros"] } 14 | -------------------------------------------------------------------------------- /googapis/genproto/google.search.partnerdataingestion.logging.v1.rs: -------------------------------------------------------------------------------- 1 | /// Log message used to send to Platform Logging. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct IngestDetailsLog { 4 | /// Identification of the successfully accepted request. 5 | #[prost(string, tag = "1")] 6 | pub ingestion_tracking_id: ::prost::alloc::string::String, 7 | /// The message content will be sent to Platform Logging. 8 | #[prost(string, tag = "2")] 9 | pub content: ::prost::alloc::string::String, 10 | } 11 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkehub.metering.v1alpha.rs: -------------------------------------------------------------------------------- 1 | /// **Metering**: Per-Membership Feature State. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct MembershipState { 4 | /// The time stamp of the most recent measurement of the number of vCPUs 5 | /// in the cluster. 6 | #[prost(message, optional, tag = "1")] 7 | pub last_measurement_time: ::core::option::Option<::prost_types::Timestamp>, 8 | /// The vCPUs capacity in the cluster according to the most recent 9 | /// measurement (1/1000 precision). 10 | #[prost(float, tag = "3")] 11 | pub precise_last_measured_cluster_vcpu_capacity: f32, 12 | } 13 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkehub.metering.v1beta.rs: -------------------------------------------------------------------------------- 1 | /// **Metering**: Per-Membership Feature State. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct MembershipState { 4 | /// The time stamp of the most recent measurement of the number of vCPUs 5 | /// in the cluster. 6 | #[prost(message, optional, tag = "1")] 7 | pub last_measurement_time: ::core::option::Option<::prost_types::Timestamp>, 8 | /// The vCPUs capacity in the cluster according to the most recent 9 | /// measurement (1/1000 precision). 10 | #[prost(float, tag = "3")] 11 | pub precise_last_measured_cluster_vcpu_capacity: f32, 12 | } 13 | -------------------------------------------------------------------------------- /googapis/genproto/google.appengine.legacy.rs: -------------------------------------------------------------------------------- 1 | /// Admin Console legacy audit log. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct AuditData { 4 | /// Text description of the admin event. 5 | /// This is the "Event" column in Admin Console's Admin Logs. 6 | #[prost(string, tag = "1")] 7 | pub event_message: ::prost::alloc::string::String, 8 | /// Arbitrary event data. 9 | /// This is the "Result" column in Admin Console's Admin Logs. 10 | #[prost(map = "string, string", tag = "2")] 11 | pub event_data: 12 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: push 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | strategy: 11 | matrix: 12 | toolchain: [stable, nightly] 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - run: git submodule update --init --recursive --recommend-shallow --depth 1 17 | - uses: actions-rs/toolchain@v1 18 | with: 19 | toolchain: ${{ matrix.toolchain }} 20 | override: true 21 | components: rustfmt 22 | - name: Generate Code 23 | run: cargo xtask gen 24 | - name: Build 25 | run: cargo build --verbose 26 | - name: Run tests 27 | run: cargo test --verbose 28 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.metastore.logging.v1.rs: -------------------------------------------------------------------------------- 1 | /// Stackdriver structured-payload for events generated from Hive Metastore 2 | /// API requests. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct RequestsLogEntry { 5 | /// A free-text string describing the request. 6 | #[prost(string, tag = "1")] 7 | pub message: ::prost::alloc::string::String, 8 | } 9 | /// Stackdriver structured-payload for events generated from Hive Metastore 10 | /// system activity. 11 | #[derive(Clone, PartialEq, ::prost::Message)] 12 | pub struct SystemActivityLogEntry { 13 | /// A free-text string describing the system activity. 14 | #[prost(string, tag = "1")] 15 | pub message: ::prost::alloc::string::String, 16 | } 17 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkehub.cloudauditlogging.v1alpha.rs: -------------------------------------------------------------------------------- 1 | /// **Cloud Audit Logging**: Spec for Audit Logging Allowlisting. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct FeatureSpec { 4 | /// Service account that should be allowlisted to send the audit logs; eg 5 | /// cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 6 | /// already exist, but do not need to have any permissions granted to them. 7 | /// The customer's entitlements will be checked prior to allowlisting (i.e. 8 | /// the customer must be an Anthos customer.) 9 | #[prost(string, repeated, tag = "1")] 10 | pub allowlisted_service_accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 11 | } 12 | -------------------------------------------------------------------------------- /.github/workflows/doc.yml: -------------------------------------------------------------------------------- 1 | name: doc 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | with: 16 | submodules: recursive 17 | - uses: actions-rs/toolchain@v1 18 | with: 19 | toolchain: stable 20 | override: true 21 | profile: minimal 22 | components: rustfmt 23 | - run: cargo xtask gen 24 | - run: cargo build -v 25 | - run: cargo test -v 26 | - run: cargo doc -v --no-deps --all-features -p googapis 27 | - uses: peaceiris/actions-gh-pages@v3 28 | with: 29 | github_token: ${{ secrets.GITHUB_TOKEN }} 30 | publish_dir: ./target/doc/ 31 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.bigquery.migration.tasks.assessment.v2alpha.rs: -------------------------------------------------------------------------------- 1 | /// Assessment task details. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct AssessmentTaskDetails { 4 | /// Required. The Cloud Storage path for assessment input files. 5 | #[prost(string, tag = "1")] 6 | pub input_path: ::prost::alloc::string::String, 7 | /// Required. The BigQuery dataset for output. 8 | #[prost(string, tag = "2")] 9 | pub output_dataset: ::prost::alloc::string::String, 10 | /// Optional. An optional Cloud Storage path to write the query logs (which is then used 11 | /// as an input path on the translation task) 12 | #[prost(string, tag = "3")] 13 | pub querylogs_path: ::prost::alloc::string::String, 14 | /// Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) from which 15 | /// the input data is extracted. 16 | #[prost(string, tag = "4")] 17 | pub data_source: ::prost::alloc::string::String, 18 | } 19 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkehub.multiclusteringress.v1alpha.rs: -------------------------------------------------------------------------------- 1 | /// **Multi-cluster Ingress**: The configuration for the MultiClusterIngress 2 | /// feature. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct FeatureSpec { 5 | /// Fully-qualified Membership name which hosts the MultiClusterIngress CRD. 6 | /// Example: `projects/foo-proj/locations/global/memberships/bar` 7 | #[prost(string, tag = "1")] 8 | pub config_membership: ::prost::alloc::string::String, 9 | /// Customer's billing structure 10 | #[prost(enumeration = "Billing", tag = "2")] 11 | pub billing: i32, 12 | } 13 | /// Billing identifies which billing structure the customer is using. 14 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 15 | #[repr(i32)] 16 | pub enum Billing { 17 | /// Unknown 18 | Unspecified = 0, 19 | /// User pays a fee per-endpoint. 20 | PayAsYouGo = 1, 21 | /// User is paying for Anthos as a whole. 22 | AnthosLicense = 2, 23 | } 24 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkehub.multiclusteringress.v1beta.rs: -------------------------------------------------------------------------------- 1 | /// **Multi-cluster Ingress**: The configuration for the MultiClusterIngress 2 | /// feature. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct FeatureSpec { 5 | /// Fully-qualified Membership name which hosts the MultiClusterIngress CRD. 6 | /// Example: `projects/foo-proj/locations/global/memberships/bar` 7 | #[prost(string, tag = "1")] 8 | pub config_membership: ::prost::alloc::string::String, 9 | /// Customer's billing structure 10 | #[prost(enumeration = "Billing", tag = "2")] 11 | pub billing: i32, 12 | } 13 | /// Billing identifies which billing structure the customer is using. 14 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 15 | #[repr(i32)] 16 | pub enum Billing { 17 | /// Unknown 18 | Unspecified = 0, 19 | /// User pays a fee per-endpoint. 20 | PayAsYouGo = 1, 21 | /// User is paying for Anthos as a whole. 22 | AnthosLicense = 2, 23 | } 24 | -------------------------------------------------------------------------------- /googapis/genproto/google.apps.script.r#type.docs.rs: -------------------------------------------------------------------------------- 1 | // Manifest section specific to Docs Add-ons. 2 | 3 | /// Docs add-on manifest. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct DocsAddOnManifest { 6 | /// If present, this overrides the configuration from 7 | /// `addOns.common.homepageTrigger`. 8 | #[prost(message, optional, tag = "1")] 9 | pub homepage_trigger: ::core::option::Option, 10 | /// Endpoint to execute when file scope authorization is granted 11 | /// for this document/user pair. 12 | #[prost(message, optional, tag = "2")] 13 | pub on_file_scope_granted_trigger: ::core::option::Option, 14 | } 15 | /// Common format for declaring a Docs add-on's triggers. 16 | #[derive(Clone, PartialEq, ::prost::Message)] 17 | pub struct DocsExtensionPoint { 18 | /// Required. The endpoint to execute when this extension point is activated. 19 | #[prost(string, tag = "1")] 20 | pub run_function: ::prost::alloc::string::String, 21 | } 22 | -------------------------------------------------------------------------------- /googapis/genproto/google.apps.script.r#type.sheets.rs: -------------------------------------------------------------------------------- 1 | // Manifest section specific to Sheets Add-ons. 2 | 3 | /// Sheets add-on manifest. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct SheetsAddOnManifest { 6 | /// If present, this overrides the configuration from 7 | /// `addOns.common.homepageTrigger`. 8 | #[prost(message, optional, tag = "3")] 9 | pub homepage_trigger: ::core::option::Option, 10 | /// Endpoint to execute when file scope authorization is granted 11 | /// for this document/user pair. 12 | #[prost(message, optional, tag = "5")] 13 | pub on_file_scope_granted_trigger: ::core::option::Option, 14 | } 15 | /// Common format for declaring a Sheets add-on's triggers. 16 | #[derive(Clone, PartialEq, ::prost::Message)] 17 | pub struct SheetsExtensionPoint { 18 | /// Required. The endpoint to execute when this extension point is activated. 19 | #[prost(string, tag = "1")] 20 | pub run_function: ::prost::alloc::string::String, 21 | } 22 | -------------------------------------------------------------------------------- /googapis/genproto/google.apps.script.r#type.slides.rs: -------------------------------------------------------------------------------- 1 | // Manifest section specific to Slides Add-ons. 2 | 3 | /// Slides add-on manifest. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct SlidesAddOnManifest { 6 | /// If present, this overrides the configuration from 7 | /// `addOns.common.homepageTrigger`. 8 | #[prost(message, optional, tag = "1")] 9 | pub homepage_trigger: ::core::option::Option, 10 | /// Endpoint to execute when file scope authorization is granted 11 | /// for this document/user pair. 12 | #[prost(message, optional, tag = "2")] 13 | pub on_file_scope_granted_trigger: ::core::option::Option, 14 | } 15 | /// Common format for declaring a Slides add-on's triggers. 16 | #[derive(Clone, PartialEq, ::prost::Message)] 17 | pub struct SlidesExtensionPoint { 18 | /// Required. The endpoint to execute when this extension point is activated. 19 | #[prost(string, tag = "1")] 20 | pub run_function: ::prost::alloc::string::String, 21 | } 22 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 mechiru 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /googapis/genproto/google.apps.script.r#type.drive.rs: -------------------------------------------------------------------------------- 1 | // Manifest section specific to Drive Add-ons. 2 | 3 | /// Drive add-on manifest. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct DriveAddOnManifest { 6 | /// If present, this overrides the configuration from 7 | /// `addOns.common.homepageTrigger`. 8 | #[prost(message, optional, tag = "1")] 9 | pub homepage_trigger: ::core::option::Option, 10 | /// Corresponds to behvior that should execute when items are selected 11 | /// in relevant Drive view (e.g. the My Drive Doclist). 12 | #[prost(message, optional, tag = "2")] 13 | pub on_items_selected_trigger: ::core::option::Option, 14 | } 15 | /// A generic extension point with common features, e.g. something that simply 16 | /// needs a corresponding run function to work. 17 | #[derive(Clone, PartialEq, ::prost::Message)] 18 | pub struct DriveExtensionPoint { 19 | /// Required. The endpoint to execute when this extension point is 20 | /// activated. 21 | #[prost(string, tag = "1")] 22 | pub run_function: ::prost::alloc::string::String, 23 | } 24 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.aiplatform.logging.rs: -------------------------------------------------------------------------------- 1 | /// The access log entry definition of online prediction. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct OnlinePredictionLogEntry { 4 | /// The resource name of the endpoint as referred to in the original request. 5 | /// For example, projects/12323/locations/us-central1/endpoints/123. 6 | #[prost(string, tag = "1")] 7 | pub endpoint: ::prost::alloc::string::String, 8 | /// The ID of the deployed model used to serve this predict request. 9 | #[prost(string, tag = "2")] 10 | pub deployed_model_id: ::prost::alloc::string::String, 11 | /// The number of instances in the prediction request. 12 | #[prost(int64, tag = "3")] 13 | pub instance_count: i64, 14 | /// The number of successfully predicted instances in the response. 15 | /// Populated when prediction succeeds. 16 | #[prost(int64, tag = "4")] 17 | pub prediction_count: i64, 18 | /// The error code and message. 19 | /// Populated when prediction fails. 20 | #[prost(message, optional, tag = "5")] 21 | pub error: ::core::option::Option, 22 | } 23 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gsuiteaddons.logging.v1.rs: -------------------------------------------------------------------------------- 1 | /// JSON payload of error messages that are logged to Cloud Logging. An error 2 | /// message (in English) is written to Cloud Logging (if not disabled) when an 3 | /// error is encountered while using an add-on. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct GSuiteAddOnsLogEntry { 6 | /// The deployment that caused the error. For add-ons built in Apps Script, 7 | /// this is the deployment ID defined by Apps Script. For add-ons built in 8 | /// other languages, this is the deployment ID defined in Google Cloud. 9 | #[prost(string, tag = "1")] 10 | pub deployment: ::prost::alloc::string::String, 11 | /// The error code and message. 12 | #[prost(message, optional, tag = "2")] 13 | pub error: ::core::option::Option, 14 | /// The function name that was running when the error occurred. This field 15 | /// might not always be set, for example, if an error happens when fetching the 16 | /// list of installed add-ons for a user. 17 | #[prost(string, tag = "3")] 18 | pub deployment_function: ::prost::alloc::string::String, 19 | } 20 | -------------------------------------------------------------------------------- /xtask/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::{env, fs, path::PathBuf}; 2 | 3 | mod gen; 4 | 5 | fn main() { 6 | match env::args().nth(1) { 7 | Some(cmd) => match cmd.as_str() { 8 | "gen" => gen(), 9 | _ => print_help(), 10 | }, 11 | _ => print_help(), 12 | } 13 | } 14 | 15 | fn print_help() { 16 | println!(r#"cargo xtask gen"#) 17 | } 18 | 19 | fn gen() { 20 | let proto_root = PathBuf::from("xtask/proto/googleapis"); 21 | let protos = gen::find_proto(proto_root.clone()); 22 | 23 | // let gates = gen::feature_gates(&protos); 24 | // println!("{}", gates); 25 | 26 | let out_dir = PathBuf::from("googapis/genproto"); 27 | let _ = fs::remove_dir_all(out_dir.as_path()); 28 | let _ = fs::create_dir(out_dir.as_path()); 29 | let includes = [proto_root]; 30 | 31 | let mut config = prost_build::Config::new(); 32 | config.protoc_arg("--experimental_allow_proto3_optional"); 33 | 34 | tonic_build::configure() 35 | .build_server(false) 36 | .format(false) 37 | .out_dir(out_dir.clone()) 38 | .compile_with_config(config, &gen::proto_path(&protos), &includes) 39 | .unwrap(); 40 | tonic_build::fmt(out_dir.to_str().unwrap()); 41 | 42 | let mut out_path = PathBuf::from("googapis/src/googapis.rs"); 43 | let root = gen::from_protos(protos); 44 | fs::write(out_path.clone(), root.gen_code()).unwrap(); 45 | 46 | out_path.pop(); 47 | tonic_build::fmt(out_path.to_str().unwrap()); 48 | } 49 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.rs: -------------------------------------------------------------------------------- 1 | /// An enum to be used to mark the essential (for polling) fields in an 2 | /// API-specific Operation object. A custom Operation object may contain many 3 | /// different fields, but only few of them are essential to conduct a successful 4 | /// polling process. 5 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 6 | #[repr(i32)] 7 | pub enum OperationResponseMapping { 8 | /// Do not use. 9 | Undefined = 0, 10 | /// A field in an API-specific (custom) Operation object which carries the same 11 | /// meaning as google.longrunning.Operation.name. 12 | Name = 1, 13 | /// A field in an API-specific (custom) Operation object which carries the same 14 | /// meaning as google.longrunning.Operation.done. If the annotated field is of 15 | /// an enum type, `annotated_field_name == EnumType.DONE` semantics should be 16 | /// equivalent to `Operation.done == true`. If the annotated field is of type 17 | /// boolean, then it should follow the same semantics as Operation.done. 18 | /// Otherwise, a non-empty value should be treated as `Operation.done == true`. 19 | Status = 2, 20 | /// A field in an API-specific (custom) Operation object which carries the same 21 | /// meaning as google.longrunning.Operation.error.code. 22 | ErrorCode = 3, 23 | /// A field in an API-specific (custom) Operation object which carries the same 24 | /// meaning as google.longrunning.Operation.error.message. 25 | ErrorMessage = 4, 26 | } 27 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.common.rs: -------------------------------------------------------------------------------- 1 | /// Represents the metadata of the long-running operation. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct OperationMetadata { 4 | /// Output only. The time the operation was created. 5 | #[prost(message, optional, tag = "1")] 6 | pub create_time: ::core::option::Option<::prost_types::Timestamp>, 7 | /// Output only. The time the operation finished running. 8 | #[prost(message, optional, tag = "2")] 9 | pub end_time: ::core::option::Option<::prost_types::Timestamp>, 10 | /// Output only. Server-defined resource path for the target of the operation. 11 | #[prost(string, tag = "3")] 12 | pub target: ::prost::alloc::string::String, 13 | /// Output only. Name of the verb executed by the operation. 14 | #[prost(string, tag = "4")] 15 | pub verb: ::prost::alloc::string::String, 16 | /// Output only. Human-readable status of the operation, if any. 17 | #[prost(string, tag = "5")] 18 | pub status_detail: ::prost::alloc::string::String, 19 | /// Output only. Identifies whether the user has requested cancellation 20 | /// of the operation. Operations that have successfully been cancelled 21 | /// have \[Operation.error][\] value with a \[google.rpc.Status.code][\] of 1, 22 | /// corresponding to `Code.CANCELLED`. 23 | #[prost(bool, tag = "6")] 24 | pub cancel_requested: bool, 25 | /// Output only. API version used to start the operation. 26 | #[prost(string, tag = "7")] 27 | pub api_version: ::prost::alloc::string::String, 28 | } 29 | -------------------------------------------------------------------------------- /examples/spanner-admin/src/main.rs: -------------------------------------------------------------------------------- 1 | use googapis::{ 2 | google::spanner::admin::database::v1::{ 3 | database_admin_client::DatabaseAdminClient, ListDatabasesRequest, 4 | }, 5 | CERTIFICATES, 6 | }; 7 | use gouth::Token; 8 | use tonic::{ 9 | metadata::MetadataValue, 10 | transport::{Certificate, Channel, ClientTlsConfig}, 11 | Request, 12 | }; 13 | 14 | #[tokio::main] 15 | async fn main() -> Result<(), Box> { 16 | let project = std::env::var("PROJECT")?; 17 | let instance = std::env::var("INSTANCE")?; 18 | let token = Token::new()?; 19 | 20 | let tls_config = ClientTlsConfig::new() 21 | .ca_certificate(Certificate::from_pem(CERTIFICATES)) 22 | .domain_name("spanner.googleapis.com"); 23 | 24 | let channel = Channel::from_static("https://spanner.googleapis.com") 25 | .tls_config(tls_config)? 26 | .connect() 27 | .await?; 28 | 29 | let mut service = DatabaseAdminClient::with_interceptor(channel, move |mut req: Request<()>| { 30 | let token = &*token.header_value().unwrap(); 31 | let meta = MetadataValue::from_str(token).unwrap(); 32 | req.metadata_mut().insert("authorization", meta); 33 | Ok(req) 34 | }); 35 | 36 | let response = service 37 | .list_databases(Request::new(ListDatabasesRequest { 38 | parent: format!("projects/{}/instances/{}", project, instance), 39 | page_size: 100, 40 | ..Default::default() 41 | })) 42 | .await?; 43 | 44 | println!("RESPONSE={:?}", response); 45 | 46 | Ok(()) 47 | } 48 | -------------------------------------------------------------------------------- /googapis/genproto/google.geo.r#type.rs: -------------------------------------------------------------------------------- 1 | /// A latitude-longitude viewport, represented as two diagonally opposite `low` 2 | /// and `high` points. A viewport is considered a closed region, i.e. it includes 3 | /// its boundary. The latitude bounds must range between -90 to 90 degrees 4 | /// inclusive, and the longitude bounds must range between -180 to 180 degrees 5 | /// inclusive. Various cases include: 6 | /// 7 | /// - If `low` = `high`, the viewport consists of that single point. 8 | /// 9 | /// - If `low.longitude` > `high.longitude`, the longitude range is inverted 10 | /// (the viewport crosses the 180 degree longitude line). 11 | /// 12 | /// - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, 13 | /// the viewport includes all longitudes. 14 | /// 15 | /// - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, 16 | /// the longitude range is empty. 17 | /// 18 | /// - If `low.latitude` > `high.latitude`, the latitude range is empty. 19 | /// 20 | /// Both `low` and `high` must be populated, and the represented box cannot be 21 | /// empty (as specified by the definitions above). An empty viewport will result 22 | /// in an error. 23 | /// 24 | /// For example, this viewport fully encloses New York City: 25 | /// 26 | /// { 27 | /// "low": { 28 | /// "latitude": 40.477398, 29 | /// "longitude": -74.259087 30 | /// }, 31 | /// "high": { 32 | /// "latitude": 40.91618, 33 | /// "longitude": -73.70018 34 | /// } 35 | /// } 36 | #[derive(Clone, PartialEq, ::prost::Message)] 37 | pub struct Viewport { 38 | /// Required. The low point of the viewport. 39 | #[prost(message, optional, tag = "1")] 40 | pub low: ::core::option::Option, 41 | /// Required. The high point of the viewport. 42 | #[prost(message, optional, tag = "2")] 43 | pub high: ::core::option::Option, 44 | } 45 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.secretmanager.logging.v1.rs: -------------------------------------------------------------------------------- 1 | /// Logged event relating to a specific secret 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct SecretEvent { 4 | /// Resource name of the secret in the format `projects/*/secrets/*` 5 | #[prost(string, tag = "1")] 6 | pub name: ::prost::alloc::string::String, 7 | /// Type of event that is being logged for the secret 8 | #[prost(enumeration = "secret_event::EventType", tag = "2")] 9 | pub r#type: i32, 10 | /// Human readable message describing the event 11 | #[prost(string, tag = "3")] 12 | pub log_message: ::prost::alloc::string::String, 13 | } 14 | /// Nested message and enum types in `SecretEvent`. 15 | pub mod secret_event { 16 | /// Describes the type of event that is being logged. All logs have exactly one 17 | /// EventType. 18 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 19 | #[repr(i32)] 20 | pub enum EventType { 21 | /// An unrecognized event type. Should never be used. 22 | Unspecified = 0, 23 | /// The secret is scheduled to expire in 30 days. 24 | ExpiresIn30Days = 1, 25 | /// The secret is scheduled to expire in 7 days. 26 | ExpiresIn7Days = 2, 27 | /// The secret is scheduled to expire in 1 day. 28 | ExpiresIn1Day = 3, 29 | /// The secret is scheduled to expire in 6 hours. 30 | ExpiresIn6Hours = 4, 31 | /// The secret is scheduled to expire in 1 hour. 32 | ExpiresIn1Hour = 5, 33 | /// The secret's expire-time has passed and it has expired. 34 | Expired = 6, 35 | /// A Pub/Sub topic configured on the secret could not be found. 36 | TopicNotFound = 7, 37 | /// A Pub/Sub topic configured on the secret does not have the needed 38 | /// permissions. The Secret Manager P4SA must be granted 39 | /// 'pubsub.topic.publish' permission (or 'roles/pubsub.publisher') on the 40 | /// topic. 41 | TopicPermissionDenied = 8, 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.recommender.logging.v1.rs: -------------------------------------------------------------------------------- 1 | /// Log content of an action on a recommendation. This includes Mark* actions. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ActionLog { 4 | /// Required. User that executed this action. Eg, foo@gmail.com 5 | #[prost(string, tag = "1")] 6 | pub actor: ::prost::alloc::string::String, 7 | /// Required. State change that was made by the actor. Eg, SUCCEEDED. 8 | #[prost(enumeration = "super::super::v1::recommendation_state_info::State", tag = "2")] 9 | pub state: i32, 10 | /// Optional. Metadata that was included with the action that was taken. 11 | #[prost(map = "string, string", tag = "3")] 12 | pub state_metadata: 13 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 14 | /// Required. Name of the recommendation which was acted on. Eg, : 15 | /// 'projects/123/locations/global/recommenders/roleReco/recommendations/r1' 16 | #[prost(string, tag = "4")] 17 | pub recommendation_name: ::prost::alloc::string::String, 18 | } 19 | /// Log content of an action on an insight. This includes Mark* actions. 20 | #[derive(Clone, PartialEq, ::prost::Message)] 21 | pub struct InsightActionLog { 22 | /// Required. User that executed this action. Eg, foo@gmail.com 23 | #[prost(string, tag = "1")] 24 | pub actor: ::prost::alloc::string::String, 25 | /// Required. State change that was made by the actor. Eg, ACCEPTED. 26 | #[prost(enumeration = "super::super::v1::insight_state_info::State", tag = "2")] 27 | pub state: i32, 28 | /// Optional. Metadata that was included with the action that was taken. 29 | #[prost(map = "string, string", tag = "3")] 30 | pub state_metadata: 31 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 32 | /// Required. Name of the insight which was acted on. Eg, : 33 | /// 'projects/123/locations/global/insightTypes/roleInsight/insights/i1' 34 | #[prost(string, tag = "4")] 35 | pub insight: ::prost::alloc::string::String, 36 | } 37 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.recommender.logging.v1beta1.rs: -------------------------------------------------------------------------------- 1 | /// Log content of an action on a recommendation. This includes Mark* actions. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ActionLog { 4 | /// Required. User that executed this action. Eg, foo@gmail.com 5 | #[prost(string, tag = "1")] 6 | pub actor: ::prost::alloc::string::String, 7 | /// Required. State change that was made by the actor. Eg, SUCCEEDED. 8 | #[prost(enumeration = "super::super::v1beta1::recommendation_state_info::State", tag = "2")] 9 | pub state: i32, 10 | /// Optional. Metadata that was included with the action that was taken. 11 | #[prost(map = "string, string", tag = "3")] 12 | pub state_metadata: 13 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 14 | /// Required. Name of the recommendation which was acted on. Eg, : 15 | /// 'projects/foo/locations/global/recommenders/roleReco/recommendations/r1' 16 | #[prost(string, tag = "4")] 17 | pub recommendation_name: ::prost::alloc::string::String, 18 | } 19 | /// Log content of an action on an insight. This includes Mark* actions. 20 | #[derive(Clone, PartialEq, ::prost::Message)] 21 | pub struct InsightActionLog { 22 | /// Required. User that executed this action. Eg, foo@gmail.com 23 | #[prost(string, tag = "1")] 24 | pub actor: ::prost::alloc::string::String, 25 | /// Required. State change that was made by the actor. Eg, ACCEPTED. 26 | #[prost(enumeration = "super::super::v1beta1::insight_state_info::State", tag = "2")] 27 | pub state: i32, 28 | /// Optional. Metadata that was included with the action that was taken. 29 | #[prost(map = "string, string", tag = "3")] 30 | pub state_metadata: 31 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 32 | /// Required. Name of the insight which was acted on. Eg, : 33 | /// 'projects/foo/locations/global/insightTypes/roleInsight/insights/i1' 34 | #[prost(string, tag = "4")] 35 | pub insight: ::prost::alloc::string::String, 36 | } 37 | -------------------------------------------------------------------------------- /googapis/genproto/google.identity.accesscontextmanager.r#type.rs: -------------------------------------------------------------------------------- 1 | /// The encryption state of the device. 2 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 3 | #[repr(i32)] 4 | pub enum DeviceEncryptionStatus { 5 | /// The encryption status of the device is not specified or not known. 6 | EncryptionUnspecified = 0, 7 | /// The device does not support encryption. 8 | EncryptionUnsupported = 1, 9 | /// The device supports encryption, but is currently unencrypted. 10 | Unencrypted = 2, 11 | /// The device is encrypted. 12 | Encrypted = 3, 13 | } 14 | /// The operating system type of the device. 15 | /// Next id: 7 16 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 17 | #[repr(i32)] 18 | pub enum OsType { 19 | /// The operating system of the device is not specified or not known. 20 | OsUnspecified = 0, 21 | /// A desktop Mac operating system. 22 | DesktopMac = 1, 23 | /// A desktop Windows operating system. 24 | DesktopWindows = 2, 25 | /// A desktop Linux operating system. 26 | DesktopLinux = 3, 27 | /// A desktop ChromeOS operating system. 28 | DesktopChromeOs = 6, 29 | /// An Android operating system. 30 | Android = 4, 31 | /// An iOS operating system. 32 | Ios = 5, 33 | } 34 | /// The degree to which the device is managed by the Cloud organization. 35 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 36 | #[repr(i32)] 37 | pub enum DeviceManagementLevel { 38 | /// The device's management level is not specified or not known. 39 | ManagementUnspecified = 0, 40 | /// The device is not managed. 41 | None = 1, 42 | /// Basic management is enabled, which is generally limited to monitoring and 43 | /// wiping the corporate account. 44 | Basic = 2, 45 | /// Complete device management. This includes more thorough monitoring and the 46 | /// ability to directly manage the device (such as remote wiping). This can be 47 | /// enabled through the Android Enterprise Platform. 48 | Complete = 3, 49 | } 50 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkeconnect.gateway.v1.rs: -------------------------------------------------------------------------------- 1 | #[doc = r" Generated client implementations."] 2 | pub mod gateway_service_client { 3 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 4 | use tonic::codegen::*; 5 | #[doc = " Gateway service is a public API which works as a Kubernetes resource model"] 6 | #[doc = " proxy between end users and registered Kubernetes clusters. Each RPC in this"] 7 | #[doc = " service matches with an HTTP verb. End user will initiate kubectl commands"] 8 | #[doc = " against the Gateway service, and Gateway service will forward user requests"] 9 | #[doc = " to clusters."] 10 | #[derive(Debug, Clone)] 11 | pub struct GatewayServiceClient { 12 | inner: tonic::client::Grpc, 13 | } 14 | impl GatewayServiceClient 15 | where 16 | T: tonic::client::GrpcService, 17 | T::ResponseBody: Body + Send + 'static, 18 | T::Error: Into, 19 | ::Error: Into + Send, 20 | { 21 | pub fn new(inner: T) -> Self { 22 | let inner = tonic::client::Grpc::new(inner); 23 | Self { inner } 24 | } 25 | pub fn with_interceptor( 26 | inner: T, 27 | interceptor: F, 28 | ) -> GatewayServiceClient> 29 | where 30 | F: tonic::service::Interceptor, 31 | T: tonic::codegen::Service< 32 | http::Request, 33 | Response = http::Response< 34 | >::ResponseBody, 35 | >, 36 | >, 37 | >>::Error: 38 | Into + Send + Sync, 39 | { 40 | GatewayServiceClient::new(InterceptedService::new(inner, interceptor)) 41 | } 42 | #[doc = r" Compress requests with `gzip`."] 43 | #[doc = r""] 44 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 45 | #[doc = r" error."] 46 | pub fn send_gzip(mut self) -> Self { 47 | self.inner = self.inner.send_gzip(); 48 | self 49 | } 50 | #[doc = r" Enable decompressing responses with `gzip`."] 51 | pub fn accept_gzip(mut self) -> Self { 52 | self.inner = self.inner.accept_gzip(); 53 | self 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkeconnect.gateway.v1alpha1.rs: -------------------------------------------------------------------------------- 1 | #[doc = r" Generated client implementations."] 2 | pub mod gateway_service_client { 3 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 4 | use tonic::codegen::*; 5 | #[doc = " Gateway service is a public API which works as a Kubernetes resource model"] 6 | #[doc = " proxy between end users and registered Kubernetes clusters. Each RPC in this"] 7 | #[doc = " service matches with an HTTP verb. End user will initiate kubectl commands"] 8 | #[doc = " against the Gateway service, and Gateway service will forward user requests"] 9 | #[doc = " to clusters."] 10 | #[derive(Debug, Clone)] 11 | pub struct GatewayServiceClient { 12 | inner: tonic::client::Grpc, 13 | } 14 | impl GatewayServiceClient 15 | where 16 | T: tonic::client::GrpcService, 17 | T::ResponseBody: Body + Send + 'static, 18 | T::Error: Into, 19 | ::Error: Into + Send, 20 | { 21 | pub fn new(inner: T) -> Self { 22 | let inner = tonic::client::Grpc::new(inner); 23 | Self { inner } 24 | } 25 | pub fn with_interceptor( 26 | inner: T, 27 | interceptor: F, 28 | ) -> GatewayServiceClient> 29 | where 30 | F: tonic::service::Interceptor, 31 | T: tonic::codegen::Service< 32 | http::Request, 33 | Response = http::Response< 34 | >::ResponseBody, 35 | >, 36 | >, 37 | >>::Error: 38 | Into + Send + Sync, 39 | { 40 | GatewayServiceClient::new(InterceptedService::new(inner, interceptor)) 41 | } 42 | #[doc = r" Compress requests with `gzip`."] 43 | #[doc = r""] 44 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 45 | #[doc = r" error."] 46 | pub fn send_gzip(mut self) -> Self { 47 | self.inner = self.inner.send_gzip(); 48 | self 49 | } 50 | #[doc = r" Enable decompressing responses with `gzip`."] 51 | pub fn accept_gzip(mut self) -> Self { 52 | self.inner = self.inner.accept_gzip(); 53 | self 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /googapis/genproto/grafeas.v1beta1.deployment.rs: -------------------------------------------------------------------------------- 1 | /// An artifact that can be deployed in some runtime. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct Deployable { 4 | /// Required. Resource URI for the artifact being deployed. 5 | #[prost(string, repeated, tag = "1")] 6 | pub resource_uri: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 7 | } 8 | /// Details of a deployment occurrence. 9 | #[derive(Clone, PartialEq, ::prost::Message)] 10 | pub struct Details { 11 | /// Required. Deployment history for the resource. 12 | #[prost(message, optional, tag = "1")] 13 | pub deployment: ::core::option::Option, 14 | } 15 | /// The period during which some deployable was active in a runtime. 16 | #[derive(Clone, PartialEq, ::prost::Message)] 17 | pub struct Deployment { 18 | /// Identity of the user that triggered this deployment. 19 | #[prost(string, tag = "1")] 20 | pub user_email: ::prost::alloc::string::String, 21 | /// Required. Beginning of the lifetime of this deployment. 22 | #[prost(message, optional, tag = "2")] 23 | pub deploy_time: ::core::option::Option<::prost_types::Timestamp>, 24 | /// End of the lifetime of this deployment. 25 | #[prost(message, optional, tag = "3")] 26 | pub undeploy_time: ::core::option::Option<::prost_types::Timestamp>, 27 | /// Configuration used to create this deployment. 28 | #[prost(string, tag = "4")] 29 | pub config: ::prost::alloc::string::String, 30 | /// Address of the runtime element hosting this deployment. 31 | #[prost(string, tag = "5")] 32 | pub address: ::prost::alloc::string::String, 33 | /// Output only. Resource URI for the artifact being deployed taken from 34 | /// the deployable field with the same name. 35 | #[prost(string, repeated, tag = "6")] 36 | pub resource_uri: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 37 | /// Platform hosting this deployment. 38 | #[prost(enumeration = "deployment::Platform", tag = "7")] 39 | pub platform: i32, 40 | } 41 | /// Nested message and enum types in `Deployment`. 42 | pub mod deployment { 43 | /// Types of platforms. 44 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 45 | #[repr(i32)] 46 | pub enum Platform { 47 | /// Unknown. 48 | Unspecified = 0, 49 | /// Google Container Engine. 50 | Gke = 1, 51 | /// Google App Engine: Flexible Environment. 52 | Flex = 2, 53 | /// Custom user-defined platform. 54 | Custom = 3, 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /googapis/genproto/google.maps.unity.rs: -------------------------------------------------------------------------------- 1 | /// Client information. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ClientInfo { 4 | /// Application ID, such as the package name on Android and the bundle 5 | /// identifier on iOS platforms. 6 | #[prost(string, tag = "1")] 7 | pub application_id: ::prost::alloc::string::String, 8 | /// Application version number, such as "1.2.3". The exact format is 9 | /// application-dependent. 10 | #[prost(string, tag = "2")] 11 | pub application_version: ::prost::alloc::string::String, 12 | /// Platform where the application is running. 13 | #[prost(enumeration = "client_info::Platform", tag = "3")] 14 | pub platform: i32, 15 | /// Operating system name and version as reported by the OS. For example, 16 | /// "Mac OS X 10.10.4". The exact format is platform-dependent. 17 | #[prost(string, tag = "4")] 18 | pub operating_system: ::prost::alloc::string::String, 19 | /// API client name and version. For example, the SDK calling the API. The 20 | /// exact format is up to the client. 21 | #[prost(string, tag = "5")] 22 | pub api_client: ::prost::alloc::string::String, 23 | /// Device model as reported by the device. The exact format is 24 | /// platform-dependent. 25 | #[prost(string, tag = "6")] 26 | pub device_model: ::prost::alloc::string::String, 27 | /// Language code (in BCP-47 format) indicating the UI language of the client. 28 | /// Examples are "en", "en-US" or "ja-Latn". For more information, see 29 | /// 30 | #[prost(string, tag = "7")] 31 | pub language_code: ::prost::alloc::string::String, 32 | /// Build number/version of the operating system. e.g., the contents of 33 | /// android.os.Build.ID in Android, or the contents of sysctl "kern.osversion" 34 | /// in iOS. 35 | #[prost(string, tag = "8")] 36 | pub operating_system_build: ::prost::alloc::string::String, 37 | } 38 | /// Nested message and enum types in `ClientInfo`. 39 | pub mod client_info { 40 | /// Platform enum. 41 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 42 | #[repr(i32)] 43 | pub enum Platform { 44 | /// Unspecified or unknown OS. 45 | Unspecified = 0, 46 | /// Development environment. 47 | Editor = 1, 48 | /// macOS. 49 | MacOs = 2, 50 | /// Windows. 51 | Windows = 3, 52 | /// Linux 53 | Linux = 4, 54 | /// Android 55 | Android = 5, 56 | /// iOS 57 | Ios = 6, 58 | /// WebGL. 59 | WebGl = 7, 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.saasaccelerator.management.logs.v1.rs: -------------------------------------------------------------------------------- 1 | /// Payload proto for Notification logs. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct NotificationStage { 4 | /// The type of the Notification Service event. 5 | #[prost(enumeration = "notification_stage::Stage", tag = "1")] 6 | pub stage: i32, 7 | /// Time of the NotificationServiceEvent. 8 | #[prost(message, optional, tag = "2")] 9 | pub event_time: ::core::option::Option<::prost_types::Timestamp>, 10 | /// The id of the notification. 11 | #[prost(string, tag = "3")] 12 | pub notification_id: ::prost::alloc::string::String, 13 | /// The event that triggered the notification. 14 | #[prost(enumeration = "notification_stage::Event", tag = "4")] 15 | pub event: i32, 16 | /// Message to denote the error related to the event if applicable. 17 | #[prost(string, tag = "5")] 18 | pub message: ::prost::alloc::string::String, 19 | } 20 | /// Nested message and enum types in `NotificationStage`. 21 | pub mod notification_stage { 22 | /// Types of Notification Status. 23 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 24 | #[repr(i32)] 25 | pub enum Stage { 26 | /// Default. 27 | Unspecified = 0, 28 | /// Notification was sent. 29 | Sent = 1, 30 | /// Notification failed to send. 31 | SendFailure = 2, 32 | /// Notification was dropped. 33 | Dropped = 3, 34 | } 35 | /// Event that triggered the notification. 36 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 37 | #[repr(i32)] 38 | pub enum Event { 39 | /// Default value. 40 | Unspecified = 0, 41 | /// When a health status has been changed. 42 | HealthStatusChange = 1, 43 | } 44 | } 45 | #[derive(Clone, PartialEq, ::prost::Message)] 46 | pub struct InstanceEvent { 47 | /// The type of the event, e.g. Create, Update, etc. 48 | #[prost(string, tag = "1")] 49 | pub verb: ::prost::alloc::string::String, 50 | /// The state of the instance, e.g. "RETRYING_CREATE_INSTANCE". 51 | #[prost(string, tag = "2")] 52 | pub stage: ::prost::alloc::string::String, 53 | /// A human-readable log message, e.g. "error in stage: CREATING, err: location 54 | /// not available". 55 | #[prost(string, tag = "3")] 56 | pub msg: ::prost::alloc::string::String, 57 | /// The ID to uniquely locate all logs associated with a given request. 58 | #[prost(string, tag = "4")] 59 | pub trace_id: ::prost::alloc::string::String, 60 | /// The instance node which is the subject of the operation, if known. 61 | /// Currently unused as tf actuation does not manage nodes. 62 | #[prost(string, tag = "5")] 63 | pub node_id: ::prost::alloc::string::String, 64 | } 65 | -------------------------------------------------------------------------------- /googapis/genproto/google.networking.trafficdirector.r#type.rs: -------------------------------------------------------------------------------- 1 | /// A common proto for describing how the Traffic Director handles 2 | /// xDS-connections/requests/responses. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct TrafficDirectorLogEntry { 5 | /// An ID of xDS-client connecting to the Traffic Director. 6 | #[prost(string, tag = "1")] 7 | pub node_id: ::prost::alloc::string::String, 8 | /// The string representation of IPv4 or IPv6 address of xDS-client 9 | /// connecting to the Traffic Director. 10 | /// IPv4 address must be in the format defined in RFC791, four octets separated 11 | /// by a period. Size of a string is between 7-15 characters. Example: 1.2.3.4 12 | /// IPv6 address must be in one of the formats defined in RFC4291. Size of a 13 | /// string is between 7-39 characters. Example: 2001:DB8:0:0:8:800:200C:417A 14 | #[prost(string, tag = "2")] 15 | pub node_ip: ::prost::alloc::string::String, 16 | /// A free text describing details of the event. 17 | #[prost(string, tag = "4")] 18 | pub description: ::prost::alloc::string::String, 19 | /// Type of xDS-client connecting to Traffic Director 20 | #[prost(enumeration = "traffic_director_log_entry::ClientType", tag = "5")] 21 | pub client_type: i32, 22 | /// The version of xDS-client connecting to Traffic Director. 23 | #[prost(string, tag = "6")] 24 | pub client_version: ::prost::alloc::string::String, 25 | /// The xDS API version used by xDS clients connecting to Traffic Director. 26 | #[prost(enumeration = "traffic_director_log_entry::TransportApiVersion", tag = "7")] 27 | pub transport_api_version: i32, 28 | } 29 | /// Nested message and enum types in `TrafficDirectorLogEntry`. 30 | pub mod traffic_director_log_entry { 31 | /// Defines possible values of client type. 32 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 33 | #[repr(i32)] 34 | pub enum ClientType { 35 | /// Unspecified. 36 | Unspecified = 0, 37 | /// Envoy client. 38 | Envoy = 1, 39 | /// gRPC Java client. 40 | GrpcJava = 2, 41 | /// gRPC C++ client. 42 | GrpcCpp = 3, 43 | /// gRPC Python client. 44 | GrpcPython = 4, 45 | /// gRPC Go client. 46 | GrpcGo = 5, 47 | /// gRPC Ruby client. 48 | GrpcRuby = 6, 49 | /// gRPC Ruby client. 50 | GrpcPhp = 7, 51 | /// gRPC Node client. 52 | GrpcNode = 8, 53 | /// gRPC CSharp client. 54 | GrpcCsharp = 9, 55 | /// unknown client type. 56 | Unknown = 10, 57 | } 58 | /// Defines possible values of API version. 59 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 60 | #[repr(i32)] 61 | pub enum TransportApiVersion { 62 | /// Unspecified. 63 | Unspecified = 0, 64 | /// v2 xDS version. 65 | V2 = 1, 66 | /// v3 xDS version. 67 | V3 = 2, 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.oslogin.common.rs: -------------------------------------------------------------------------------- 1 | /// The POSIX account information associated with a Google account. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct PosixAccount { 4 | /// Only one POSIX account can be marked as primary. 5 | #[prost(bool, tag = "1")] 6 | pub primary: bool, 7 | /// The username of the POSIX account. 8 | #[prost(string, tag = "2")] 9 | pub username: ::prost::alloc::string::String, 10 | /// The user ID. 11 | #[prost(int64, tag = "3")] 12 | pub uid: i64, 13 | /// The default group ID. 14 | #[prost(int64, tag = "4")] 15 | pub gid: i64, 16 | /// The path to the home directory for this account. 17 | #[prost(string, tag = "5")] 18 | pub home_directory: ::prost::alloc::string::String, 19 | /// The path to the logic shell for this account. 20 | #[prost(string, tag = "6")] 21 | pub shell: ::prost::alloc::string::String, 22 | /// The GECOS (user information) entry for this account. 23 | #[prost(string, tag = "7")] 24 | pub gecos: ::prost::alloc::string::String, 25 | /// System identifier for which account the username or uid applies to. 26 | /// By default, the empty value is used. 27 | #[prost(string, tag = "8")] 28 | pub system_id: ::prost::alloc::string::String, 29 | /// Output only. A POSIX account identifier. 30 | #[prost(string, tag = "9")] 31 | pub account_id: ::prost::alloc::string::String, 32 | /// The operating system type where this account applies. 33 | #[prost(enumeration = "OperatingSystemType", tag = "10")] 34 | pub operating_system_type: i32, 35 | /// Output only. The canonical resource name. 36 | #[prost(string, tag = "11")] 37 | pub name: ::prost::alloc::string::String, 38 | } 39 | /// The SSH public key information associated with a Google account. 40 | #[derive(Clone, PartialEq, ::prost::Message)] 41 | pub struct SshPublicKey { 42 | /// Public key text in SSH format, defined by 43 | /// target="_blank">RFC4253 44 | /// section 6.6. 45 | #[prost(string, tag = "1")] 46 | pub key: ::prost::alloc::string::String, 47 | /// An expiration time in microseconds since epoch. 48 | #[prost(int64, tag = "2")] 49 | pub expiration_time_usec: i64, 50 | /// Output only. The SHA-256 fingerprint of the SSH public key. 51 | #[prost(string, tag = "3")] 52 | pub fingerprint: ::prost::alloc::string::String, 53 | /// Output only. The canonical resource name. 54 | #[prost(string, tag = "4")] 55 | pub name: ::prost::alloc::string::String, 56 | } 57 | /// The operating system options for account entries. 58 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 59 | #[repr(i32)] 60 | pub enum OperatingSystemType { 61 | /// The operating system type associated with the user account information is 62 | /// unspecified. 63 | Unspecified = 0, 64 | /// Linux user account information. 65 | Linux = 1, 66 | /// Windows user account information. 67 | Windows = 2, 68 | } 69 | -------------------------------------------------------------------------------- /googapis/genproto/grafeas.v1beta1.discovery.rs: -------------------------------------------------------------------------------- 1 | /// A note that indicates a type of analysis a provider would perform. This note 2 | /// exists in a provider's project. A `Discovery` occurrence is created in a 3 | /// consumer's project at the start of analysis. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct Discovery { 6 | /// Required. Immutable. The kind of analysis that is handled by this 7 | /// discovery. 8 | #[prost(enumeration = "super::NoteKind", tag = "1")] 9 | pub analysis_kind: i32, 10 | } 11 | /// Details of a discovery occurrence. 12 | #[derive(Clone, PartialEq, ::prost::Message)] 13 | pub struct Details { 14 | /// Required. Analysis status for the discovered resource. 15 | #[prost(message, optional, tag = "1")] 16 | pub discovered: ::core::option::Option, 17 | } 18 | /// Provides information about the analysis status of a discovered resource. 19 | #[derive(Clone, PartialEq, ::prost::Message)] 20 | pub struct Discovered { 21 | /// Whether the resource is continuously analyzed. 22 | #[prost(enumeration = "discovered::ContinuousAnalysis", tag = "1")] 23 | pub continuous_analysis: i32, 24 | /// The last time continuous analysis was done for this resource. 25 | #[prost(message, optional, tag = "2")] 26 | pub last_analysis_time: ::core::option::Option<::prost_types::Timestamp>, 27 | /// The status of discovery for the resource. 28 | #[prost(enumeration = "discovered::AnalysisStatus", tag = "3")] 29 | pub analysis_status: i32, 30 | /// When an error is encountered this will contain a LocalizedMessage under 31 | /// details to show to the user. The LocalizedMessage is output only and 32 | /// populated by the API. 33 | #[prost(message, optional, tag = "4")] 34 | pub analysis_status_error: ::core::option::Option, 35 | } 36 | /// Nested message and enum types in `Discovered`. 37 | pub mod discovered { 38 | /// Whether the resource is continuously analyzed. 39 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 40 | #[repr(i32)] 41 | pub enum ContinuousAnalysis { 42 | /// Unknown. 43 | Unspecified = 0, 44 | /// The resource is continuously analyzed. 45 | Active = 1, 46 | /// The resource is ignored for continuous analysis. 47 | Inactive = 2, 48 | } 49 | /// Analysis status for a resource. Currently for initial analysis only (not 50 | /// updated in continuous analysis). 51 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 52 | #[repr(i32)] 53 | pub enum AnalysisStatus { 54 | /// Unknown. 55 | Unspecified = 0, 56 | /// Resource is known but no action has been taken yet. 57 | Pending = 1, 58 | /// Resource is being analyzed. 59 | Scanning = 2, 60 | /// Analysis has finished successfully. 61 | FinishedSuccess = 3, 62 | /// Analysis has finished unsuccessfully, the analysis itself is in a bad 63 | /// state. 64 | FinishedFailed = 4, 65 | /// The resource is known not to be supported 66 | FinishedUnsupported = 5, 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /googapis/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! This library generated from [Google API][`googleapis`] using [tonic-build][`tonic-build`]. 2 | //! 3 | //! ## Example 4 | //! The complete code can be found [here][`spanner-admin-example`]. 5 | //! 6 | //! Cargo.toml: 7 | //! ```toml 8 | //! [dependencies] 9 | //! googapis = { version = "0.5", features = ["google-spanner-admin-database-v1"] } 10 | //! gouth = { version = "0.2" } 11 | //! tonic = { version = "0.5", features = ["tls"] } 12 | //! prost = "0.8" 13 | //! prost-types = "0.8" 14 | //! tokio = { version = "1.9", features = ["rt-multi-thread", "time", "fs", "macros"] } 15 | //! ``` 16 | //! 17 | //! main.rs: 18 | //! ```ignore 19 | //! use googapis::{ 20 | //! google::spanner::admin::database::v1::{ 21 | //! database_admin_client::DatabaseAdminClient, ListDatabasesRequest, 22 | //! }, 23 | //! CERTIFICATES, 24 | //! }; 25 | //! use gouth::Token; 26 | //! use tonic::{ 27 | //! metadata::MetadataValue, 28 | //! transport::{Certificate, Channel, ClientTlsConfig}, 29 | //! Request, 30 | //! }; 31 | //! 32 | //! #[tokio::main] 33 | //! async fn main() -> Result<(), Box> { 34 | //! let project = std::env::var("PROJECT")?; 35 | //! let instance = std::env::var("INSTANCE")?; 36 | //! let token = Token::new()?; 37 | //! 38 | //! let tls_config = ClientTlsConfig::new() 39 | //! .ca_certificate(Certificate::from_pem(CERTIFICATES)) 40 | //! .domain_name("spanner.googleapis.com"); 41 | //! 42 | //! let channel = Channel::from_static("https://spanner.googleapis.com") 43 | //! .tls_config(tls_config)? 44 | //! .connect() 45 | //! .await?; 46 | //! 47 | //! let mut service = DatabaseAdminClient::with_interceptor(channel, move |mut req: Request<()>| { 48 | //! let token = &*token.header_value().unwrap(); 49 | //! let meta = MetadataValue::from_str(token).unwrap(); 50 | //! req.metadata_mut().insert("authorization", meta); 51 | //! Ok(req) 52 | //! }); 53 | //! 54 | //! let response = service 55 | //! .list_databases(Request::new(ListDatabasesRequest { 56 | //! parent: format!("projects/{}/instances/{}", project, instance), 57 | //! page_size: 100, 58 | //! ..Default::default() 59 | //! })) 60 | //! .await?; 61 | //! 62 | //! println!("RESPONSE={:?}", response); 63 | //! 64 | //! Ok(()) 65 | //! } 66 | //! ``` 67 | //! 68 | //! [`googleapis`]: https://github.com/googleapis/googleapis 69 | //! [`tonic-build`]: https://github.com/hyperium/tonic/tree/master/tonic-build 70 | //! [`spanner-admin-example`]: https://github.com/mechiru/googapis/tree/master/examples/spanner-admin 71 | 72 | /// The minimal google root set downloaded from https://pki.goog/roots.pem. 73 | /// 74 | /// # Example 75 | /// ```no_run 76 | /// # use tonic::transport::{Certificate, ClientTlsConfig}; 77 | /// # use googapis::CERTIFICATES; 78 | /// let tls_config = ClientTlsConfig::new() 79 | /// .ca_certificate(Certificate::from_pem(CERTIFICATES)) 80 | /// .domain_name("spanner.googleapis.com"); 81 | /// ```` 82 | pub const CERTIFICATES: &[u8] = include_bytes!("../data/roots.pem"); 83 | 84 | #[allow(unused_macros)] 85 | macro_rules! include_proto { 86 | ($package: tt) => { 87 | include!(concat!("../genproto", concat!("/", $package, ".rs"))); 88 | }; 89 | } 90 | 91 | include!("googapis.rs"); 92 | -------------------------------------------------------------------------------- /googapis/genproto/google.gapic.metadata.rs: -------------------------------------------------------------------------------- 1 | /// Metadata about a GAPIC library for a specific combination of API, version, and 2 | /// computer language. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct GapicMetadata { 5 | /// Schema version of this proto. Current value: 1.0 6 | #[prost(string, tag = "1")] 7 | pub schema: ::prost::alloc::string::String, 8 | /// Any human-readable comments to be included in this file. 9 | #[prost(string, tag = "2")] 10 | pub comment: ::prost::alloc::string::String, 11 | /// Computer language of this generated language. This must be 12 | /// spelled out as it spoken in English, with no capitalization or 13 | /// separators (e.g. "csharp", "nodejs"). 14 | #[prost(string, tag = "3")] 15 | pub language: ::prost::alloc::string::String, 16 | /// The proto package containing the API definition for which this 17 | /// GAPIC library was generated. 18 | #[prost(string, tag = "4")] 19 | pub proto_package: ::prost::alloc::string::String, 20 | /// The language-specific library package for this GAPIC library. 21 | #[prost(string, tag = "5")] 22 | pub library_package: ::prost::alloc::string::String, 23 | /// A map from each proto-defined service to ServiceForTransports, 24 | /// which allows listing information about transport-specific 25 | /// implementations of the service. 26 | /// 27 | /// The key is the name of the service as it appears in the .proto 28 | /// file. 29 | #[prost(map = "string, message", tag = "6")] 30 | pub services: ::std::collections::HashMap< 31 | ::prost::alloc::string::String, 32 | gapic_metadata::ServiceForTransport, 33 | >, 34 | } 35 | /// Nested message and enum types in `GapicMetadata`. 36 | pub mod gapic_metadata { 37 | /// A map from a transport name to ServiceAsClient, which allows 38 | /// listing information about the client objects that implement the 39 | /// parent RPC service for the specified transport. 40 | /// 41 | /// The key name is the transport, lower-cased with no separators 42 | /// (e.g. "grpc", "rest"). 43 | #[derive(Clone, PartialEq, ::prost::Message)] 44 | pub struct ServiceForTransport { 45 | #[prost(map = "string, message", tag = "1")] 46 | pub clients: ::std::collections::HashMap<::prost::alloc::string::String, ServiceAsClient>, 47 | } 48 | /// Information about a specific client implementing a proto-defined service. 49 | #[derive(Clone, PartialEq, ::prost::Message)] 50 | pub struct ServiceAsClient { 51 | /// The name of the library client formatted as it appears in the source code 52 | #[prost(string, tag = "1")] 53 | pub library_client: ::prost::alloc::string::String, 54 | /// A mapping from each proto-defined RPC name to the the list of 55 | /// methods in library_client that implement it. There can be more 56 | /// than one library_client method for each RPC. RPCs with no 57 | /// library_client methods need not be included. 58 | /// 59 | /// The key name is the name of the RPC as defined and formated in 60 | /// the proto file. 61 | #[prost(map = "string, message", tag = "2")] 62 | pub rpcs: ::std::collections::HashMap<::prost::alloc::string::String, MethodList>, 63 | } 64 | /// List of GAPIC client methods implementing the proto-defined RPC 65 | /// for the transport and service specified in the containing 66 | /// structures. 67 | #[derive(Clone, PartialEq, ::prost::Message)] 68 | pub struct MethodList { 69 | /// List of methods for a specific proto-service client in the 70 | /// GAPIC. These names should be formatted as they appear in the 71 | /// source code. 72 | #[prost(string, repeated, tag = "1")] 73 | pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /googapis/genproto/grafeas.v1beta1.build.rs: -------------------------------------------------------------------------------- 1 | /// Note holding the version of the provider's builder and the signature of the 2 | /// provenance message in the build details occurrence. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct Build { 5 | /// Required. Immutable. Version of the builder which produced this build. 6 | #[prost(string, tag = "1")] 7 | pub builder_version: ::prost::alloc::string::String, 8 | /// Signature of the build in occurrences pointing to this build note 9 | /// containing build details. 10 | #[prost(message, optional, tag = "2")] 11 | pub signature: ::core::option::Option, 12 | } 13 | /// Message encapsulating the signature of the verified build. 14 | #[derive(Clone, PartialEq, ::prost::Message)] 15 | pub struct BuildSignature { 16 | /// Public key of the builder which can be used to verify that the related 17 | /// findings are valid and unchanged. If `key_type` is empty, this defaults 18 | /// to PEM encoded public keys. 19 | /// 20 | /// This field may be empty if `key_id` references an external key. 21 | /// 22 | /// For Cloud Build based signatures, this is a PEM encoded public 23 | /// key. To verify the Cloud Build signature, place the contents of 24 | /// this field into a file (public.pem). The signature field is base64-decoded 25 | /// into its binary representation in signature.bin, and the provenance bytes 26 | /// from `BuildDetails` are base64-decoded into a binary representation in 27 | /// signed.bin. OpenSSL can then verify the signature: 28 | /// `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 29 | #[prost(string, tag = "1")] 30 | pub public_key: ::prost::alloc::string::String, 31 | /// Required. Signature of the related `BuildProvenance`. In JSON, this is 32 | /// base-64 encoded. 33 | #[prost(bytes = "vec", tag = "2")] 34 | pub signature: ::prost::alloc::vec::Vec, 35 | /// An ID for the key used to sign. This could be either an ID for the key 36 | /// stored in `public_key` (such as the ID or fingerprint for a PGP key, or the 37 | /// CN for a cert), or a reference to an external key (such as a reference to a 38 | /// key in Cloud Key Management Service). 39 | #[prost(string, tag = "3")] 40 | pub key_id: ::prost::alloc::string::String, 41 | /// The type of the key, either stored in `public_key` or referenced in 42 | /// `key_id`. 43 | #[prost(enumeration = "build_signature::KeyType", tag = "4")] 44 | pub key_type: i32, 45 | } 46 | /// Nested message and enum types in `BuildSignature`. 47 | pub mod build_signature { 48 | /// Public key formats. 49 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 50 | #[repr(i32)] 51 | pub enum KeyType { 52 | /// `KeyType` is not set. 53 | Unspecified = 0, 54 | /// `PGP ASCII Armored` public key. 55 | PgpAsciiArmored = 1, 56 | /// `PKIX PEM` public key. 57 | PkixPem = 2, 58 | } 59 | } 60 | /// Details of a build occurrence. 61 | #[derive(Clone, PartialEq, ::prost::Message)] 62 | pub struct Details { 63 | /// Required. The actual provenance for the build. 64 | #[prost(message, optional, tag = "1")] 65 | pub provenance: ::core::option::Option, 66 | /// Serialized JSON representation of the provenance, used in generating the 67 | /// build signature in the corresponding build note. After verifying the 68 | /// signature, `provenance_bytes` can be unmarshalled and compared to the 69 | /// provenance to confirm that it is unchanged. A base64-encoded string 70 | /// representation of the provenance bytes is used for the signature in order 71 | /// to interoperate with openssl which expects this format for signature 72 | /// verification. 73 | /// 74 | /// The serialized form is captured both to avoid ambiguity in how the 75 | /// provenance is marshalled to json as well to prevent incompatibilities with 76 | /// future changes. 77 | #[prost(string, tag = "2")] 78 | pub provenance_bytes: ::prost::alloc::string::String, 79 | } 80 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.phishingprotection.v1beta1.rs: -------------------------------------------------------------------------------- 1 | /// The ReportPhishing request message. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ReportPhishingRequest { 4 | /// Required. The name of the project for which the report will be created, 5 | /// in the format "projects/{project_number}". 6 | #[prost(string, tag = "1")] 7 | pub parent: ::prost::alloc::string::String, 8 | /// Required. The URI that is being reported for phishing content to be analyzed. 9 | #[prost(string, tag = "2")] 10 | pub uri: ::prost::alloc::string::String, 11 | } 12 | /// The ReportPhishing (empty) response message. 13 | #[derive(Clone, PartialEq, ::prost::Message)] 14 | pub struct ReportPhishingResponse {} 15 | #[doc = r" Generated client implementations."] 16 | pub mod phishing_protection_service_v1_beta1_client { 17 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 18 | use tonic::codegen::*; 19 | #[doc = " Service to report phishing URIs."] 20 | #[derive(Debug, Clone)] 21 | pub struct PhishingProtectionServiceV1Beta1Client { 22 | inner: tonic::client::Grpc, 23 | } 24 | impl PhishingProtectionServiceV1Beta1Client 25 | where 26 | T: tonic::client::GrpcService, 27 | T::ResponseBody: Body + Send + 'static, 28 | T::Error: Into, 29 | ::Error: Into + Send, 30 | { 31 | pub fn new(inner: T) -> Self { 32 | let inner = tonic::client::Grpc::new(inner); 33 | Self { inner } 34 | } 35 | pub fn with_interceptor( 36 | inner: T, 37 | interceptor: F, 38 | ) -> PhishingProtectionServiceV1Beta1Client> 39 | where 40 | F: tonic::service::Interceptor, 41 | T: tonic::codegen::Service< 42 | http::Request, 43 | Response = http::Response< 44 | >::ResponseBody, 45 | >, 46 | >, 47 | >>::Error: 48 | Into + Send + Sync, 49 | { 50 | PhishingProtectionServiceV1Beta1Client::new(InterceptedService::new(inner, interceptor)) 51 | } 52 | #[doc = r" Compress requests with `gzip`."] 53 | #[doc = r""] 54 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 55 | #[doc = r" error."] 56 | pub fn send_gzip(mut self) -> Self { 57 | self.inner = self.inner.send_gzip(); 58 | self 59 | } 60 | #[doc = r" Enable decompressing responses with `gzip`."] 61 | pub fn accept_gzip(mut self) -> Self { 62 | self.inner = self.inner.accept_gzip(); 63 | self 64 | } 65 | #[doc = " Reports a URI suspected of containing phishing content to be reviewed. Once"] 66 | #[doc = " the report review is complete, its result can be found in the Cloud"] 67 | #[doc = " Security Command Center findings dashboard for Phishing Protection. If the"] 68 | #[doc = " result verifies the existence of malicious phishing content, the site will"] 69 | #[doc = " be added the to [Google's Social Engineering"] 70 | #[doc = " lists](https://support.google.com/webmasters/answer/6350487/) in order to"] 71 | #[doc = " protect users that could get exposed to this threat in the future."] 72 | pub async fn report_phishing( 73 | &mut self, 74 | request: impl tonic::IntoRequest, 75 | ) -> Result, tonic::Status> { 76 | self.inner.ready().await.map_err(|e| { 77 | tonic::Status::new( 78 | tonic::Code::Unknown, 79 | format!("Service was not ready: {}", e.into()), 80 | ) 81 | })?; 82 | let codec = tonic::codec::ProstCodec::default(); 83 | let path = http :: uri :: PathAndQuery :: from_static ("/google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1/ReportPhishing") ; 84 | self.inner.unary(request.into_request(), path, codec).await 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /googapis/genproto/google.apps.script.r#type.calendar.rs: -------------------------------------------------------------------------------- 1 | // Manifest section specific to Calendar Add-ons. 2 | 3 | /// Calendar add-on manifest. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct CalendarAddOnManifest { 6 | /// Defines an endpoint that will be executed contexts that don't 7 | /// match a declared contextual trigger. Any cards generated by this function 8 | /// will always be available to the user, but may be eclipsed by contextual 9 | /// content when this add-on declares more targeted triggers. 10 | /// 11 | /// If present, this overrides the configuration from 12 | /// `addOns.common.homepageTrigger`. 13 | #[prost(message, optional, tag = "6")] 14 | pub homepage_trigger: ::core::option::Option, 15 | /// Defines conference solutions provided by this add-on. 16 | #[prost(message, repeated, tag = "3")] 17 | pub conference_solution: ::prost::alloc::vec::Vec, 18 | /// An endpoint to execute that creates a URL to the add-on's settings page. 19 | #[prost(string, tag = "5")] 20 | pub create_settings_url_function: ::prost::alloc::string::String, 21 | /// An endpoint to trigger when an event is opened (viewed/edited). 22 | #[prost(message, optional, tag = "10")] 23 | pub event_open_trigger: ::core::option::Option, 24 | /// An endpoint to trigger when the open event is updated. 25 | #[prost(message, optional, tag = "11")] 26 | pub event_update_trigger: ::core::option::Option, 27 | /// Define the level of data access when an event addon is triggered. 28 | #[prost(enumeration = "calendar_add_on_manifest::EventAccess", tag = "12")] 29 | pub current_event_access: i32, 30 | } 31 | /// Nested message and enum types in `CalendarAddOnManifest`. 32 | pub mod calendar_add_on_manifest { 33 | /// An enum defining the level of data access event triggers require. 34 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 35 | #[repr(i32)] 36 | pub enum EventAccess { 37 | /// Default value when nothing is set for EventAccess. 38 | Unspecified = 0, 39 | /// METADATA gives event triggers the permission to access the metadata of 40 | /// events such as event id and calendar id. 41 | Metadata = 1, 42 | /// READ gives event triggers access to all provided event fields including 43 | /// the metadata, attendees, and conference data. 44 | Read = 3, 45 | /// WRITE gives event triggers access to the metadata of events and the 46 | /// ability to perform all actions, including adding attendees and setting 47 | /// conference data. 48 | Write = 4, 49 | /// READ_WRITE gives event triggers access to all provided event fields 50 | /// including the metadata, attendees, and conference data and the ability to 51 | /// perform all actions. 52 | ReadWrite = 5, 53 | } 54 | } 55 | /// Defines conference related values. 56 | #[derive(Clone, PartialEq, ::prost::Message)] 57 | pub struct ConferenceSolution { 58 | /// Required. The endpoint to call when ConferenceData should be created. 59 | #[prost(string, tag = "1")] 60 | pub on_create_function: ::prost::alloc::string::String, 61 | /// Required. IDs should be unique across ConferenceSolutions within one 62 | /// add-on, but this is not strictly enforced. It is up to the add-on developer 63 | /// to assign them uniquely, otherwise the wrong ConferenceSolution may be 64 | /// used when the add-on is triggered. While the developer may change the 65 | /// display name of an add-on, the ID should not be changed. 66 | #[prost(string, tag = "4")] 67 | pub id: ::prost::alloc::string::String, 68 | /// Required. The display name of the ConferenceSolution. 69 | #[prost(string, tag = "5")] 70 | pub name: ::prost::alloc::string::String, 71 | /// Required. The URL for the logo image of the ConferenceSolution. 72 | #[prost(string, tag = "6")] 73 | pub logo_url: ::prost::alloc::string::String, 74 | } 75 | /// Common format for declaring a calendar add-on's triggers. 76 | #[derive(Clone, PartialEq, ::prost::Message)] 77 | pub struct CalendarExtensionPoint { 78 | /// Required. The endpoint to execute when this extension point is 79 | /// activated. 80 | #[prost(string, tag = "1")] 81 | pub run_function: ::prost::alloc::string::String, 82 | } 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # googapis 2 | 3 | [![ci](https://github.com/mechiru/googapis/workflows/ci/badge.svg)](https://github.com/mechiru/googapis/actions?query=workflow:ci) 4 | [![Rust Documentation](https://docs.rs/googapis/badge.svg)](https://mechiru.github.io/googapis/googapis/index.html) 5 | [![Latest Version](https://img.shields.io/crates/v/googapis.svg)](https://crates.io/crates/googapis) 6 | 7 | This library generated from [Google API](https://github.com/googleapis/googleapis) using [tonic-build](https://github.com/hyperium/tonic/tree/master/tonic-build). 8 | 9 | ## Overview 10 | This library contains all the code generated from the Google API. 11 | 12 | When using each product API, you must explicitly include it in your build using a feature flag. 13 | For example, if you want to use [Cloud Pub/Sub](https://cloud.google.com/pubsub), write `features = ["google-pubsub-v1"]` to Cargo.toml. 14 | 15 | The feature name is the period of the package name of each proto file, replaced by a hyphen. 16 | If you specify a package, it will automatically load the dependent packages and include them in the build. 17 | It means that `features = ["google-spanner-admin-database-v1"]` is the same as the code below: 18 | ```rust 19 | pub mod google { 20 | pub mod api { 21 | tonic::include_proto!("google.api"); 22 | } 23 | pub mod iam { 24 | pub mod v1 { 25 | tonic::include_proto!("google.iam.v1"); 26 | } 27 | } 28 | pub mod longrunning { 29 | tonic::include_proto!("google.longrunning"); 30 | } 31 | pub mod r#type { 32 | tonic::include_proto!("google.r#type"); 33 | } 34 | pub mod rpc { 35 | tonic::include_proto!("google.rpc"); 36 | } 37 | pub mod spanner { 38 | pub mod admin { 39 | pub mod database { 40 | pub mod v1 { 41 | tonic::include_proto!("google.spanner.admin.database.v1"); 42 | } 43 | } 44 | } 45 | } 46 | } 47 | ``` 48 | 49 | In addition, multiple features can be specified. 50 | 51 | The list of available features can be found [here](./googapis/Cargo.toml#L22-L315). 52 | 53 | ## Version matrices 54 | | googapis | tonic | tonic-build | 55 | |----------|-------|-------------| 56 | | 0.1.x | 0.2.x | 0.2.x | 57 | | 0.2.x | 0.2.x | 0.2.x | 58 | | 0.3.x | 0.3.x | 0.3.x | 59 | | 0.4.x | 0.4.x | 0.4.x | 60 | | 0.5.x | 0.5.x | 0.5.x | 61 | | 0.6.x | 0.6.x | 0.6.x | 62 | 63 | ## Example 64 | The complete code can be found [here](./examples/spanner-admin). 65 | 66 | Cargo.toml: 67 | ```toml 68 | [dependencies] 69 | googapis = { version = "0.6", features = ["google-spanner-admin-database-v1"] } 70 | gouth = { version = "0.2" } 71 | tonic = { version = "0.6", features = ["tls"] } 72 | prost = "0.9" 73 | prost-types = "0.9" 74 | tokio = { version = "1.13", features = ["rt-multi-thread", "time", "fs", "macros"] } 75 | ``` 76 | 77 | main.rs: 78 | ```rust 79 | use googapis::{ 80 | google::spanner::admin::database::v1::{ 81 | database_admin_client::DatabaseAdminClient, ListDatabasesRequest, 82 | }, 83 | CERTIFICATES, 84 | }; 85 | use gouth::Token; 86 | use tonic::{ 87 | metadata::MetadataValue, 88 | transport::{Certificate, Channel, ClientTlsConfig}, 89 | Request, 90 | }; 91 | 92 | #[tokio::main] 93 | async fn main() -> Result<(), Box> { 94 | let project = std::env::var("PROJECT")?; 95 | let instance = std::env::var("INSTANCE")?; 96 | let token = Token::new()?; 97 | 98 | let tls_config = ClientTlsConfig::new() 99 | .ca_certificate(Certificate::from_pem(CERTIFICATES)) 100 | .domain_name("spanner.googleapis.com"); 101 | 102 | let channel = Channel::from_static("https://spanner.googleapis.com") 103 | .tls_config(tls_config)? 104 | .connect() 105 | .await?; 106 | 107 | let mut service = DatabaseAdminClient::with_interceptor(channel, move |mut req: Request<()>| { 108 | let token = &*token.header_value().unwrap(); 109 | let meta = MetadataValue::from_str(token).unwrap(); 110 | req.metadata_mut().insert("authorization", meta); 111 | Ok(req) 112 | }); 113 | 114 | let response = service 115 | .list_databases(Request::new(ListDatabasesRequest { 116 | parent: format!("projects/{}/instances/{}", project, instance), 117 | page_size: 100, 118 | ..Default::default() 119 | })) 120 | .await?; 121 | 122 | println!("RESPONSE={:?}", response); 123 | 124 | Ok(()) 125 | } 126 | ``` 127 | 128 | ## License 129 | Licensed under either of [Apache License, Version 2.0](./LICENSE-APACHE) or [MIT license](./LICENSE-MIT) at your option. 130 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkehub.servicemesh.v1alpha.rs: -------------------------------------------------------------------------------- 1 | /// **Service Mesh**: State for the whole Hub, as analyzed by the Service Mesh 2 | /// Hub Controller. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct FeatureState { 5 | /// Output only. Results of running Service Mesh analyzers. 6 | #[prost(message, repeated, tag = "1")] 7 | pub analysis_messages: ::prost::alloc::vec::Vec, 8 | } 9 | /// **Service Mesh**: State for a single Membership, as analyzed by the Service 10 | /// Mesh Hub Controller. 11 | #[derive(Clone, PartialEq, ::prost::Message)] 12 | pub struct MembershipState { 13 | /// Output only. Results of running Service Mesh analyzers. 14 | #[prost(message, repeated, tag = "1")] 15 | pub analysis_messages: ::prost::alloc::vec::Vec, 16 | } 17 | /// AnalysisMessageBase describes some common information that is 18 | /// needed for all messages. 19 | #[derive(Clone, PartialEq, ::prost::Message)] 20 | pub struct AnalysisMessageBase { 21 | /// Represents the specific type of a message. 22 | #[prost(message, optional, tag = "1")] 23 | pub r#type: ::core::option::Option, 24 | /// Represents how severe a message is. 25 | #[prost(enumeration = "analysis_message_base::Level", tag = "2")] 26 | pub level: i32, 27 | /// A url pointing to the Service Mesh or Istio documentation for this specific 28 | /// error type. 29 | #[prost(string, tag = "3")] 30 | pub documentation_url: ::prost::alloc::string::String, 31 | } 32 | /// Nested message and enum types in `AnalysisMessageBase`. 33 | pub mod analysis_message_base { 34 | /// A unique identifier for the type of message. Display_name is intended to be 35 | /// human-readable, code is intended to be machine readable. There should be a 36 | /// one-to-one mapping between display_name and code. (i.e. do not re-use 37 | /// display_names or codes between message types.) 38 | /// See istio.analysis.v1alpha1.AnalysisMessageBase.Type 39 | #[derive(Clone, PartialEq, ::prost::Message)] 40 | pub struct Type { 41 | /// A human-readable name for the message type. e.g. "InternalError", 42 | /// "PodMissingProxy". This should be the same for all messages of the same 43 | /// type. (This corresponds to the `name` field in open-source Istio.) 44 | #[prost(string, tag = "1")] 45 | pub display_name: ::prost::alloc::string::String, 46 | /// A 7 character code matching `^IST\[0-9\]{4}$` or `^ASM\[0-9\]{4}$`, intended 47 | /// to uniquely identify the message type. (e.g. "IST0001" is mapped to the 48 | /// "InternalError" message type.) 49 | #[prost(string, tag = "2")] 50 | pub code: ::prost::alloc::string::String, 51 | } 52 | /// The values here are chosen so that more severe messages get sorted higher, 53 | /// as well as leaving space in between to add more later 54 | /// See istio.analysis.v1alpha1.AnalysisMessageBase.Level 55 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 56 | #[repr(i32)] 57 | pub enum Level { 58 | /// Illegal. Same istio.analysis.v1alpha1.AnalysisMessageBase.Level.UNKNOWN. 59 | Unspecified = 0, 60 | /// ERROR represents a misconfiguration that must be fixed. 61 | Error = 3, 62 | /// WARNING represents a misconfiguration that should be fixed. 63 | Warning = 8, 64 | /// INFO represents an informational finding. 65 | Info = 12, 66 | } 67 | } 68 | /// AnalysisMessage is a single message produced by an analyzer, and 69 | /// it used to communicate to the end user about the state of their Service 70 | /// Mesh configuration. 71 | #[derive(Clone, PartialEq, ::prost::Message)] 72 | pub struct AnalysisMessage { 73 | /// Details common to all types of Istio and ServiceMesh analysis messages. 74 | #[prost(message, optional, tag = "1")] 75 | pub message_base: ::core::option::Option, 76 | /// A human readable description of what the error means. It is suitable for 77 | /// non-internationalize display purposes. 78 | #[prost(string, tag = "2")] 79 | pub description: ::prost::alloc::string::String, 80 | /// A list of strings specifying the resource identifiers that were the cause 81 | /// of message generation. 82 | /// A "path" here may be: 83 | /// * MEMBERSHIP_ID if the cause is a specific member cluster 84 | /// * MEMBERSHIP_ID/(NAMESPACE\/)?RESOURCETYPE/NAME if the cause is a resource 85 | /// in a cluster 86 | #[prost(string, repeated, tag = "3")] 87 | pub resource_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 88 | /// A UI can combine these args with a template (based on message_base.type) 89 | /// to produce an internationalized message. 90 | #[prost(message, optional, tag = "4")] 91 | pub args: ::core::option::Option<::prost_types::Struct>, 92 | } 93 | -------------------------------------------------------------------------------- /googapis/genproto/google.firestore.bundle.rs: -------------------------------------------------------------------------------- 1 | /// Encodes a query saved in the bundle. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct BundledQuery { 4 | /// The parent resource name. 5 | #[prost(string, tag = "1")] 6 | pub parent: ::prost::alloc::string::String, 7 | #[prost(enumeration = "bundled_query::LimitType", tag = "3")] 8 | pub limit_type: i32, 9 | /// The query to run. 10 | #[prost(oneof = "bundled_query::QueryType", tags = "2")] 11 | pub query_type: ::core::option::Option, 12 | } 13 | /// Nested message and enum types in `BundledQuery`. 14 | pub mod bundled_query { 15 | /// If the query is a limit query, should the limit be applied to the beginning or 16 | /// the end of results. 17 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 18 | #[repr(i32)] 19 | pub enum LimitType { 20 | First = 0, 21 | Last = 1, 22 | } 23 | /// The query to run. 24 | #[derive(Clone, PartialEq, ::prost::Oneof)] 25 | pub enum QueryType { 26 | /// A structured query. 27 | #[prost(message, tag = "2")] 28 | StructuredQuery(super::super::v1::StructuredQuery), 29 | } 30 | } 31 | /// A Query associated with a name, created as part of the bundle file, and can be read 32 | /// by client SDKs once the bundle containing them is loaded. 33 | #[derive(Clone, PartialEq, ::prost::Message)] 34 | pub struct NamedQuery { 35 | /// Name of the query, such that client can use the name to load this query 36 | /// from bundle, and resume from when the query results are materialized 37 | /// into this bundle. 38 | #[prost(string, tag = "1")] 39 | pub name: ::prost::alloc::string::String, 40 | /// The query saved in the bundle. 41 | #[prost(message, optional, tag = "2")] 42 | pub bundled_query: ::core::option::Option, 43 | /// The read time of the query, when it is used to build the bundle. This is useful to 44 | /// resume the query from the bundle, once it is loaded by client SDKs. 45 | #[prost(message, optional, tag = "3")] 46 | pub read_time: ::core::option::Option<::prost_types::Timestamp>, 47 | } 48 | /// Metadata describing a Firestore document saved in the bundle. 49 | #[derive(Clone, PartialEq, ::prost::Message)] 50 | pub struct BundledDocumentMetadata { 51 | /// The document key of a bundled document. 52 | #[prost(string, tag = "1")] 53 | pub name: ::prost::alloc::string::String, 54 | /// The snapshot version of the document data bundled. 55 | #[prost(message, optional, tag = "2")] 56 | pub read_time: ::core::option::Option<::prost_types::Timestamp>, 57 | /// Whether the document exists. 58 | #[prost(bool, tag = "3")] 59 | pub exists: bool, 60 | /// The names of the queries in this bundle that this document matches to. 61 | #[prost(string, repeated, tag = "4")] 62 | pub queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 63 | } 64 | /// Metadata describing the bundle file/stream. 65 | #[derive(Clone, PartialEq, ::prost::Message)] 66 | pub struct BundleMetadata { 67 | /// The ID of the bundle. 68 | #[prost(string, tag = "1")] 69 | pub id: ::prost::alloc::string::String, 70 | /// Time at which the documents snapshot is taken for this bundle. 71 | #[prost(message, optional, tag = "2")] 72 | pub create_time: ::core::option::Option<::prost_types::Timestamp>, 73 | /// The schema version of the bundle. 74 | #[prost(uint32, tag = "3")] 75 | pub version: u32, 76 | /// The number of documents in the bundle. 77 | #[prost(uint32, tag = "4")] 78 | pub total_documents: u32, 79 | /// The size of the bundle in bytes, excluding this `BundleMetadata`. 80 | #[prost(uint64, tag = "5")] 81 | pub total_bytes: u64, 82 | } 83 | /// A Firestore bundle is a length-prefixed stream of JSON representations of 84 | /// `BundleElement`. 85 | /// Only one `BundleMetadata` is expected, and it should be the first element. 86 | /// The named queries follow after `metadata`. Every `document_metadata` is 87 | /// immediately followed by a `document`. 88 | #[derive(Clone, PartialEq, ::prost::Message)] 89 | pub struct BundleElement { 90 | #[prost(oneof = "bundle_element::ElementType", tags = "1, 2, 3, 4")] 91 | pub element_type: ::core::option::Option, 92 | } 93 | /// Nested message and enum types in `BundleElement`. 94 | pub mod bundle_element { 95 | #[derive(Clone, PartialEq, ::prost::Oneof)] 96 | pub enum ElementType { 97 | #[prost(message, tag = "1")] 98 | Metadata(super::BundleMetadata), 99 | #[prost(message, tag = "2")] 100 | NamedQuery(super::NamedQuery), 101 | #[prost(message, tag = "3")] 102 | DocumentMetadata(super::BundledDocumentMetadata), 103 | #[prost(message, tag = "4")] 104 | Document(super::super::v1::Document), 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /googapis/genproto/google.actions.r#type.rs: -------------------------------------------------------------------------------- 1 | /// Represents a range based on whole or partial calendar dates, e.g. the 2 | /// duration of a hotel reservation or the Common Era. This can represent: 3 | /// 4 | /// * A range between full dates, e.g. the duration of a hotel reservation 5 | /// * A range between years, e.g. a historical era 6 | /// * A range between year/month dates, e.g. the duration of a job on a resume 7 | /// * A range beginning in a year, e.g. the Common Era 8 | /// * A range ending on a specific date, e.g. the period of time before an event 9 | /// 10 | /// While \[google.type.Date][google.type.Date\] allows zero years, DateRange does not. Year must 11 | /// always be non-zero. 12 | /// 13 | /// End cannot be chronologically before start. For example, if start has year 14 | /// 2000, end cannot have year 1999. 15 | /// 16 | /// When both set, start and end must have exactly the same precision. That is, 17 | /// they must have the same fields populated with non-zero values. For example, 18 | /// if start specifies only year and month, then end must also specify only year 19 | /// and month (but not day). 20 | /// 21 | /// The date range is inclusive. That is, the dates specified by start and end 22 | /// are part of the date range. For example, the date January 1, 2000 falls 23 | /// within any date with start or end equal to January 1, 2000. When determining 24 | /// whether a date is inside a date range, the date should only be compared to 25 | /// start and end when those values are set. 26 | /// 27 | /// When a date and date range are specified to different degrees of precision, 28 | /// the rules for evaluating whether that date is inside the date range are as 29 | /// follows: 30 | /// 31 | /// * When comparing the date to the start of the date range, unspecified months 32 | /// should be replaced with 1, and unspecified days should be replaced with 1. 33 | /// For example, the year 2000 is within the date range with start equal to 34 | /// January 1, 2000 and no end. And the date January 1, 2000 is within the 35 | /// date range with start equal to the year 2000 and no end. 36 | /// 37 | /// * When comparing the date to the end of the date range, unspecified months 38 | /// should be replaced with 12, and unspecified days should be replaced with 39 | /// the last valid day for the month/year. For example, the year 2000 is 40 | /// within the date range with start equal to January 1, 1999 and end equal to 41 | /// December 31, 2000. And the date December 31, 2001 is within the date range 42 | /// with start equal to the year 2000 and end equal to the year 2001. 43 | /// 44 | /// The semantics of start and end are the same as those of \[google.type.Date][google.type.Date\], 45 | /// except that year must always be non-zero in DateRange. 46 | #[derive(Clone, PartialEq, ::prost::Message)] 47 | pub struct DateRange { 48 | /// Date at which the date range begins. If unset, the date range has no 49 | /// beginning bound. 50 | #[prost(message, optional, tag = "1")] 51 | pub start: ::core::option::Option, 52 | /// Date at which the date range ends. If unset, the date range has no ending 53 | /// bound. 54 | #[prost(message, optional, tag = "2")] 55 | pub end: ::core::option::Option, 56 | } 57 | /// Represents a date and time range. This can represent: 58 | /// 59 | /// * A range between points in time with time zone or offset, e.g. the duration 60 | /// of a flight which starts in the "America/New_York" time zone and ends in 61 | /// the "Australia/Sydney" time zone 62 | /// * A range between points in time without time zone/offset info, e.g. an 63 | /// appointment in local time 64 | /// * A range starting at a specific date and time, e.g. the range of time which 65 | /// can be measured in milliseconds since the Unix epoch (period starting with 66 | /// 1970-01-01T00:00:00Z) 67 | /// * A range ending at a specific date and time, e.g. range of time before 68 | /// a deadline 69 | /// 70 | /// When considering whether a DateTime falls within a DateTimeRange, the start 71 | /// of the range is inclusive and the end is exclusive. 72 | /// 73 | /// While \[google.type.DateTime][google.type.DateTime\] allows zero years, DateTimeRange does not. 74 | /// Year must always be non-zero. 75 | /// 76 | /// When both start and end are set, either both or neither must have a 77 | /// time_offset. When set, time_offset can be specified by either utc_offset or 78 | /// time_zone and must match for start and end, that is if start has utc_offset 79 | /// set then end must also have utc_offset set. The values of utc_offset or 80 | /// time_zone need not be the same for start and end. 81 | /// 82 | /// When both start and end are set, start must be chronologically less than or 83 | /// equal to end. When start and end are equal, the range is empty. 84 | /// 85 | /// The semantics of start and end are the same as those of 86 | /// \[google.type.DateTime][google.type.DateTime\]. 87 | #[derive(Clone, PartialEq, ::prost::Message)] 88 | pub struct DateTimeRange { 89 | /// DateTime at which the date range begins. If unset, the range has no 90 | /// beginning bound. 91 | #[prost(message, optional, tag = "1")] 92 | pub start: ::core::option::Option, 93 | /// DateTime at which the date range ends. If unset, the range has no ending 94 | /// bound. 95 | #[prost(message, optional, tag = "2")] 96 | pub end: ::core::option::Option, 97 | } 98 | -------------------------------------------------------------------------------- /googapis/genproto/grafeas.v1beta1.package.rs: -------------------------------------------------------------------------------- 1 | /// This represents a particular channel of distribution for a given package. 2 | /// E.g., Debian's jessie-backports dpkg mirror. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct Distribution { 5 | /// Required. The cpe_uri in [CPE format]() 6 | /// denoting the package manager version distributing a package. 7 | #[prost(string, tag = "1")] 8 | pub cpe_uri: ::prost::alloc::string::String, 9 | /// The CPU architecture for which packages in this distribution channel were 10 | /// built. 11 | #[prost(enumeration = "Architecture", tag = "2")] 12 | pub architecture: i32, 13 | /// The latest available version of this package in this distribution channel. 14 | #[prost(message, optional, tag = "3")] 15 | pub latest_version: ::core::option::Option, 16 | /// A freeform string denoting the maintainer of this package. 17 | #[prost(string, tag = "4")] 18 | pub maintainer: ::prost::alloc::string::String, 19 | /// The distribution channel-specific homepage for this package. 20 | #[prost(string, tag = "5")] 21 | pub url: ::prost::alloc::string::String, 22 | /// The distribution channel-specific description of this package. 23 | #[prost(string, tag = "6")] 24 | pub description: ::prost::alloc::string::String, 25 | } 26 | /// An occurrence of a particular package installation found within a system's 27 | /// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. 28 | #[derive(Clone, PartialEq, ::prost::Message)] 29 | pub struct Location { 30 | /// Required. The CPE URI in [CPE format]() 31 | /// denoting the package manager version distributing a package. 32 | #[prost(string, tag = "1")] 33 | pub cpe_uri: ::prost::alloc::string::String, 34 | /// The version installed at this location. 35 | #[prost(message, optional, tag = "2")] 36 | pub version: ::core::option::Option, 37 | /// The path from which we gathered that this package/version is installed. 38 | #[prost(string, tag = "3")] 39 | pub path: ::prost::alloc::string::String, 40 | } 41 | /// This represents a particular package that is distributed over various 42 | /// channels. E.g., glibc (aka libc6) is distributed by many, at various 43 | /// versions. 44 | #[derive(Clone, PartialEq, ::prost::Message)] 45 | pub struct Package { 46 | /// Required. Immutable. The name of the package. 47 | #[prost(string, tag = "1")] 48 | pub name: ::prost::alloc::string::String, 49 | /// The various channels by which a package is distributed. 50 | #[prost(message, repeated, tag = "10")] 51 | pub distribution: ::prost::alloc::vec::Vec, 52 | } 53 | /// Details of a package occurrence. 54 | #[derive(Clone, PartialEq, ::prost::Message)] 55 | pub struct Details { 56 | /// Required. Where the package was installed. 57 | #[prost(message, optional, tag = "1")] 58 | pub installation: ::core::option::Option, 59 | } 60 | /// This represents how a particular software package may be installed on a 61 | /// system. 62 | #[derive(Clone, PartialEq, ::prost::Message)] 63 | pub struct Installation { 64 | /// Output only. The name of the installed package. 65 | #[prost(string, tag = "1")] 66 | pub name: ::prost::alloc::string::String, 67 | /// Required. All of the places within the filesystem versions of this package 68 | /// have been found. 69 | #[prost(message, repeated, tag = "2")] 70 | pub location: ::prost::alloc::vec::Vec, 71 | } 72 | /// Version contains structured information about the version of a package. 73 | #[derive(Clone, PartialEq, ::prost::Message)] 74 | pub struct Version { 75 | /// Used to correct mistakes in the version numbering scheme. 76 | #[prost(int32, tag = "1")] 77 | pub epoch: i32, 78 | /// Required only when version kind is NORMAL. The main part of the version 79 | /// name. 80 | #[prost(string, tag = "2")] 81 | pub name: ::prost::alloc::string::String, 82 | /// The iteration of the package build from the above version. 83 | #[prost(string, tag = "3")] 84 | pub revision: ::prost::alloc::string::String, 85 | /// Required. Distinguishes between sentinel MIN/MAX versions and normal 86 | /// versions. 87 | #[prost(enumeration = "version::VersionKind", tag = "4")] 88 | pub kind: i32, 89 | } 90 | /// Nested message and enum types in `Version`. 91 | pub mod version { 92 | /// Whether this is an ordinary package version or a sentinel MIN/MAX version. 93 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 94 | #[repr(i32)] 95 | pub enum VersionKind { 96 | /// Unknown. 97 | Unspecified = 0, 98 | /// A standard package version. 99 | Normal = 1, 100 | /// A special version representing negative infinity. 101 | Minimum = 2, 102 | /// A special version representing positive infinity. 103 | Maximum = 3, 104 | } 105 | } 106 | /// Instruction set architectures supported by various package managers. 107 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 108 | #[repr(i32)] 109 | pub enum Architecture { 110 | /// Unknown architecture. 111 | Unspecified = 0, 112 | /// X86 architecture. 113 | X86 = 1, 114 | /// X64 architecture. 115 | X64 = 2, 116 | } 117 | -------------------------------------------------------------------------------- /googapis/genproto/google.logging.r#type.rs: -------------------------------------------------------------------------------- 1 | /// The severity of the event described in a log entry, expressed as one of the 2 | /// standard severity levels listed below. For your reference, the levels are 3 | /// assigned the listed numeric values. The effect of using numeric values other 4 | /// than those listed is undefined. 5 | /// 6 | /// You can filter for log entries by severity. For example, the following 7 | /// filter expression will match log entries with severities `INFO`, `NOTICE`, 8 | /// and `WARNING`: 9 | /// 10 | /// severity > DEBUG AND severity <= WARNING 11 | /// 12 | /// If you are writing log entries, you should map other severity encodings to 13 | /// one of these standard levels. For example, you might map all of Java's FINE, 14 | /// FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the 15 | /// original severity level in the log entry payload if you wish. 16 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 17 | #[repr(i32)] 18 | pub enum LogSeverity { 19 | /// (0) The log entry has no assigned severity level. 20 | Default = 0, 21 | /// (100) Debug or trace information. 22 | Debug = 100, 23 | /// (200) Routine information, such as ongoing status or performance. 24 | Info = 200, 25 | /// (300) Normal but significant events, such as start up, shut down, or 26 | /// a configuration change. 27 | Notice = 300, 28 | /// (400) Warning events might cause problems. 29 | Warning = 400, 30 | /// (500) Error events are likely to cause problems. 31 | Error = 500, 32 | /// (600) Critical events cause more severe problems or outages. 33 | Critical = 600, 34 | /// (700) A person must take an action immediately. 35 | Alert = 700, 36 | /// (800) One or more systems are unusable. 37 | Emergency = 800, 38 | } 39 | /// A common proto for logging HTTP requests. Only contains semantics 40 | /// defined by the HTTP specification. Product-specific logging 41 | /// information MUST be defined in a separate message. 42 | #[derive(Clone, PartialEq, ::prost::Message)] 43 | pub struct HttpRequest { 44 | /// The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. 45 | #[prost(string, tag = "1")] 46 | pub request_method: ::prost::alloc::string::String, 47 | /// The scheme (http, https), the host name, the path and the query 48 | /// portion of the URL that was requested. 49 | /// Example: `" 50 | #[prost(string, tag = "2")] 51 | pub request_url: ::prost::alloc::string::String, 52 | /// The size of the HTTP request message in bytes, including the request 53 | /// headers and the request body. 54 | #[prost(int64, tag = "3")] 55 | pub request_size: i64, 56 | /// The response code indicating the status of response. 57 | /// Examples: 200, 404. 58 | #[prost(int32, tag = "4")] 59 | pub status: i32, 60 | /// The size of the HTTP response message sent back to the client, in bytes, 61 | /// including the response headers and the response body. 62 | #[prost(int64, tag = "5")] 63 | pub response_size: i64, 64 | /// The user agent sent by the client. Example: 65 | /// `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET 66 | /// CLR 1.0.3705)"`. 67 | #[prost(string, tag = "6")] 68 | pub user_agent: ::prost::alloc::string::String, 69 | /// The IP address (IPv4 or IPv6) of the client that issued the HTTP 70 | /// request. This field can include port information. Examples: 71 | /// `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. 72 | #[prost(string, tag = "7")] 73 | pub remote_ip: ::prost::alloc::string::String, 74 | /// The IP address (IPv4 or IPv6) of the origin server that the request was 75 | /// sent to. This field can include port information. Examples: 76 | /// `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. 77 | #[prost(string, tag = "13")] 78 | pub server_ip: ::prost::alloc::string::String, 79 | /// The referer URL of the request, as defined in 80 | /// [HTTP/1.1 Header Field 81 | /// Definitions](). 82 | #[prost(string, tag = "8")] 83 | pub referer: ::prost::alloc::string::String, 84 | /// The request processing latency on the server, from the time the request was 85 | /// received until the response was sent. 86 | #[prost(message, optional, tag = "14")] 87 | pub latency: ::core::option::Option<::prost_types::Duration>, 88 | /// Whether or not a cache lookup was attempted. 89 | #[prost(bool, tag = "11")] 90 | pub cache_lookup: bool, 91 | /// Whether or not an entity was served from cache 92 | /// (with or without validation). 93 | #[prost(bool, tag = "9")] 94 | pub cache_hit: bool, 95 | /// Whether or not the response was validated with the origin server before 96 | /// being served from cache. This field is only meaningful if `cache_hit` is 97 | /// True. 98 | #[prost(bool, tag = "10")] 99 | pub cache_validated_with_origin_server: bool, 100 | /// The number of HTTP response bytes inserted into cache. Set only when a 101 | /// cache fill was attempted. 102 | #[prost(int64, tag = "12")] 103 | pub cache_fill_bytes: i64, 104 | /// Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" 105 | #[prost(string, tag = "15")] 106 | pub protocol: ::prost::alloc::string::String, 107 | } 108 | -------------------------------------------------------------------------------- /googapis/genproto/grafeas.v1beta1.image.rs: -------------------------------------------------------------------------------- 1 | /// Layer holds metadata specific to a layer of a Docker image. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct Layer { 4 | /// Required. The recovered Dockerfile directive used to construct this layer. 5 | #[prost(enumeration = "layer::Directive", tag = "1")] 6 | pub directive: i32, 7 | /// The recovered arguments to the Dockerfile directive. 8 | #[prost(string, tag = "2")] 9 | pub arguments: ::prost::alloc::string::String, 10 | } 11 | /// Nested message and enum types in `Layer`. 12 | pub mod layer { 13 | /// Instructions from Dockerfile. 14 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 15 | #[repr(i32)] 16 | pub enum Directive { 17 | /// Default value for unsupported/missing directive. 18 | Unspecified = 0, 19 | /// 20 | Maintainer = 1, 21 | /// 22 | Run = 2, 23 | /// 24 | Cmd = 3, 25 | /// 26 | Label = 4, 27 | /// 28 | Expose = 5, 29 | /// 30 | Env = 6, 31 | /// 32 | Add = 7, 33 | /// 34 | Copy = 8, 35 | /// 36 | Entrypoint = 9, 37 | /// 38 | Volume = 10, 39 | /// 40 | User = 11, 41 | /// 42 | Workdir = 12, 43 | /// 44 | Arg = 13, 45 | /// 46 | Onbuild = 14, 47 | /// 48 | Stopsignal = 15, 49 | /// 50 | Healthcheck = 16, 51 | /// 52 | Shell = 17, 53 | } 54 | } 55 | /// A set of properties that uniquely identify a given Docker image. 56 | #[derive(Clone, PartialEq, ::prost::Message)] 57 | pub struct Fingerprint { 58 | /// Required. The layer ID of the final layer in the Docker image's v1 59 | /// representation. 60 | #[prost(string, tag = "1")] 61 | pub v1_name: ::prost::alloc::string::String, 62 | /// Required. The ordered list of v2 blobs that represent a given image. 63 | #[prost(string, repeated, tag = "2")] 64 | pub v2_blob: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 65 | /// Output only. The name of the image's v2 blobs computed via: 66 | /// \[bottom\] := v2_blob\[bottom\] 67 | /// \[N\] := sha256(v2_blob\[N\] + " " + v2_name\[N+1\]) 68 | /// Only the name of the final blob is kept. 69 | #[prost(string, tag = "3")] 70 | pub v2_name: ::prost::alloc::string::String, 71 | } 72 | /// Basis describes the base image portion (Note) of the DockerImage 73 | /// relationship. Linked occurrences are derived from this or an 74 | /// equivalent image via: 75 | /// FROM 76 | /// Or an equivalent reference, e.g. a tag of the resource_url. 77 | #[derive(Clone, PartialEq, ::prost::Message)] 78 | pub struct Basis { 79 | /// Required. Immutable. The resource_url for the resource representing the 80 | /// basis of associated occurrence images. 81 | #[prost(string, tag = "1")] 82 | pub resource_url: ::prost::alloc::string::String, 83 | /// Required. Immutable. The fingerprint of the base image. 84 | #[prost(message, optional, tag = "2")] 85 | pub fingerprint: ::core::option::Option, 86 | } 87 | /// Details of an image occurrence. 88 | #[derive(Clone, PartialEq, ::prost::Message)] 89 | pub struct Details { 90 | /// Required. Immutable. The child image derived from the base image. 91 | #[prost(message, optional, tag = "1")] 92 | pub derived_image: ::core::option::Option, 93 | } 94 | /// Derived describes the derived image portion (Occurrence) of the DockerImage 95 | /// relationship. This image would be produced from a Dockerfile with FROM 96 | /// . 97 | #[derive(Clone, PartialEq, ::prost::Message)] 98 | pub struct Derived { 99 | /// Required. The fingerprint of the derived image. 100 | #[prost(message, optional, tag = "1")] 101 | pub fingerprint: ::core::option::Option, 102 | /// Output only. The number of layers by which this image differs from the 103 | /// associated image basis. 104 | #[prost(int32, tag = "2")] 105 | pub distance: i32, 106 | /// This contains layer-specific metadata, if populated it has length 107 | /// "distance" and is ordered with \[distance\] being the layer immediately 108 | /// following the base image and \[1\] being the final layer. 109 | #[prost(message, repeated, tag = "3")] 110 | pub layer_info: ::prost::alloc::vec::Vec, 111 | /// Output only. This contains the base image URL for the derived image 112 | /// occurrence. 113 | #[prost(string, tag = "4")] 114 | pub base_resource_url: ::prost::alloc::string::String, 115 | } 116 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.aiplatform.v1.schema.predict.params.rs: -------------------------------------------------------------------------------- 1 | /// Prediction model parameters for Image Classification. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ImageClassificationPredictionParams { 4 | /// The Model only returns predictions with at least this confidence score. 5 | /// Default value is 0.0 6 | #[prost(float, tag = "1")] 7 | pub confidence_threshold: f32, 8 | /// The Model only returns up to that many top, by confidence score, 9 | /// predictions per instance. If this number is very high, the Model may return 10 | /// fewer predictions. Default value is 10. 11 | #[prost(int32, tag = "2")] 12 | pub max_predictions: i32, 13 | } 14 | /// Prediction model parameters for Image Object Detection. 15 | #[derive(Clone, PartialEq, ::prost::Message)] 16 | pub struct ImageObjectDetectionPredictionParams { 17 | /// The Model only returns predictions with at least this confidence score. 18 | /// Default value is 0.0 19 | #[prost(float, tag = "1")] 20 | pub confidence_threshold: f32, 21 | /// The Model only returns up to that many top, by confidence score, 22 | /// predictions per instance. Note that number of returned predictions is also 23 | /// limited by metadata's predictionsLimit. Default value is 10. 24 | #[prost(int32, tag = "2")] 25 | pub max_predictions: i32, 26 | } 27 | /// Prediction model parameters for Image Segmentation. 28 | #[derive(Clone, PartialEq, ::prost::Message)] 29 | pub struct ImageSegmentationPredictionParams { 30 | /// When the model predicts category of pixels of the image, it will only 31 | /// provide predictions for pixels that it is at least this much confident 32 | /// about. All other pixels will be classified as background. Default value is 33 | /// 0.5. 34 | #[prost(float, tag = "1")] 35 | pub confidence_threshold: f32, 36 | } 37 | /// Prediction model parameters for Video Action Recognition. 38 | #[derive(Clone, PartialEq, ::prost::Message)] 39 | pub struct VideoActionRecognitionPredictionParams { 40 | /// The Model only returns predictions with at least this confidence score. 41 | /// Default value is 0.0 42 | #[prost(float, tag = "1")] 43 | pub confidence_threshold: f32, 44 | /// The model only returns up to that many top, by confidence score, 45 | /// predictions per frame of the video. If this number is very high, the 46 | /// Model may return fewer predictions per frame. Default value is 50. 47 | #[prost(int32, tag = "2")] 48 | pub max_predictions: i32, 49 | } 50 | /// Prediction model parameters for Video Classification. 51 | #[derive(Clone, PartialEq, ::prost::Message)] 52 | pub struct VideoClassificationPredictionParams { 53 | /// The Model only returns predictions with at least this confidence score. 54 | /// Default value is 0.0 55 | #[prost(float, tag = "1")] 56 | pub confidence_threshold: f32, 57 | /// The Model only returns up to that many top, by confidence score, 58 | /// predictions per instance. If this number is very high, the Model may return 59 | /// fewer predictions. Default value is 10,000. 60 | #[prost(int32, tag = "2")] 61 | pub max_predictions: i32, 62 | /// Set to true to request segment-level classification. Vertex AI returns 63 | /// labels and their confidence scores for the entire time segment of the 64 | /// video that user specified in the input instance. 65 | /// Default value is true 66 | #[prost(bool, tag = "3")] 67 | pub segment_classification: bool, 68 | /// Set to true to request shot-level classification. Vertex AI determines 69 | /// the boundaries for each camera shot in the entire time segment of the 70 | /// video that user specified in the input instance. Vertex AI then 71 | /// returns labels and their confidence scores for each detected shot, along 72 | /// with the start and end time of the shot. 73 | /// WARNING: Model evaluation is not done for this classification type, 74 | /// the quality of it depends on the training data, but there are no metrics 75 | /// provided to describe that quality. 76 | /// Default value is false 77 | #[prost(bool, tag = "4")] 78 | pub shot_classification: bool, 79 | /// Set to true to request classification for a video at one-second intervals. 80 | /// Vertex AI returns labels and their confidence scores for each second of 81 | /// the entire time segment of the video that user specified in the input 82 | /// WARNING: Model evaluation is not done for this classification type, the 83 | /// quality of it depends on the training data, but there are no metrics 84 | /// provided to describe that quality. Default value is false 85 | #[prost(bool, tag = "5")] 86 | pub one_sec_interval_classification: bool, 87 | } 88 | /// Prediction model parameters for Video Object Tracking. 89 | #[derive(Clone, PartialEq, ::prost::Message)] 90 | pub struct VideoObjectTrackingPredictionParams { 91 | /// The Model only returns predictions with at least this confidence score. 92 | /// Default value is 0.0 93 | #[prost(float, tag = "1")] 94 | pub confidence_threshold: f32, 95 | /// The model only returns up to that many top, by confidence score, 96 | /// predictions per frame of the video. If this number is very high, the 97 | /// Model may return fewer predictions per frame. Default value is 50. 98 | #[prost(int32, tag = "2")] 99 | pub max_predictions: i32, 100 | /// Only bounding boxes with shortest edge at least that long as a relative 101 | /// value of video frame size are returned. Default value is 0.0. 102 | #[prost(float, tag = "3")] 103 | pub min_bounding_box_size: f32, 104 | } 105 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.aiplatform.v1beta1.schema.predict.params.rs: -------------------------------------------------------------------------------- 1 | /// Prediction model parameters for Image Classification. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ImageClassificationPredictionParams { 4 | /// The Model only returns predictions with at least this confidence score. 5 | /// Default value is 0.0 6 | #[prost(float, tag = "1")] 7 | pub confidence_threshold: f32, 8 | /// The Model only returns up to that many top, by confidence score, 9 | /// predictions per instance. If this number is very high, the Model may return 10 | /// fewer predictions. Default value is 10. 11 | #[prost(int32, tag = "2")] 12 | pub max_predictions: i32, 13 | } 14 | /// Prediction model parameters for Image Object Detection. 15 | #[derive(Clone, PartialEq, ::prost::Message)] 16 | pub struct ImageObjectDetectionPredictionParams { 17 | /// The Model only returns predictions with at least this confidence score. 18 | /// Default value is 0.0 19 | #[prost(float, tag = "1")] 20 | pub confidence_threshold: f32, 21 | /// The Model only returns up to that many top, by confidence score, 22 | /// predictions per instance. Note that number of returned predictions is also 23 | /// limited by metadata's predictionsLimit. Default value is 10. 24 | #[prost(int32, tag = "2")] 25 | pub max_predictions: i32, 26 | } 27 | /// Prediction model parameters for Image Segmentation. 28 | #[derive(Clone, PartialEq, ::prost::Message)] 29 | pub struct ImageSegmentationPredictionParams { 30 | /// When the model predicts category of pixels of the image, it will only 31 | /// provide predictions for pixels that it is at least this much confident 32 | /// about. All other pixels will be classified as background. Default value is 33 | /// 0.5. 34 | #[prost(float, tag = "1")] 35 | pub confidence_threshold: f32, 36 | } 37 | /// Prediction model parameters for Video Action Recognition. 38 | #[derive(Clone, PartialEq, ::prost::Message)] 39 | pub struct VideoActionRecognitionPredictionParams { 40 | /// The Model only returns predictions with at least this confidence score. 41 | /// Default value is 0.0 42 | #[prost(float, tag = "1")] 43 | pub confidence_threshold: f32, 44 | /// The model only returns up to that many top, by confidence score, 45 | /// predictions per frame of the video. If this number is very high, the 46 | /// Model may return fewer predictions per frame. Default value is 50. 47 | #[prost(int32, tag = "2")] 48 | pub max_predictions: i32, 49 | } 50 | /// Prediction model parameters for Video Classification. 51 | #[derive(Clone, PartialEq, ::prost::Message)] 52 | pub struct VideoClassificationPredictionParams { 53 | /// The Model only returns predictions with at least this confidence score. 54 | /// Default value is 0.0 55 | #[prost(float, tag = "1")] 56 | pub confidence_threshold: f32, 57 | /// The Model only returns up to that many top, by confidence score, 58 | /// predictions per instance. If this number is very high, the Model may return 59 | /// fewer predictions. Default value is 10,000. 60 | #[prost(int32, tag = "2")] 61 | pub max_predictions: i32, 62 | /// Set to true to request segment-level classification. Vertex AI returns 63 | /// labels and their confidence scores for the entire time segment of the 64 | /// video that user specified in the input instance. 65 | /// Default value is true 66 | #[prost(bool, tag = "3")] 67 | pub segment_classification: bool, 68 | /// Set to true to request shot-level classification. Vertex AI determines 69 | /// the boundaries for each camera shot in the entire time segment of the 70 | /// video that user specified in the input instance. Vertex AI then 71 | /// returns labels and their confidence scores for each detected shot, along 72 | /// with the start and end time of the shot. 73 | /// WARNING: Model evaluation is not done for this classification type, 74 | /// the quality of it depends on the training data, but there are no metrics 75 | /// provided to describe that quality. 76 | /// Default value is false 77 | #[prost(bool, tag = "4")] 78 | pub shot_classification: bool, 79 | /// Set to true to request classification for a video at one-second intervals. 80 | /// Vertex AI returns labels and their confidence scores for each second of 81 | /// the entire time segment of the video that user specified in the input 82 | /// WARNING: Model evaluation is not done for this classification type, the 83 | /// quality of it depends on the training data, but there are no metrics 84 | /// provided to describe that quality. Default value is false 85 | #[prost(bool, tag = "5")] 86 | pub one_sec_interval_classification: bool, 87 | } 88 | /// Prediction model parameters for Video Object Tracking. 89 | #[derive(Clone, PartialEq, ::prost::Message)] 90 | pub struct VideoObjectTrackingPredictionParams { 91 | /// The Model only returns predictions with at least this confidence score. 92 | /// Default value is 0.0 93 | #[prost(float, tag = "1")] 94 | pub confidence_threshold: f32, 95 | /// The model only returns up to that many top, by confidence score, 96 | /// predictions per frame of the video. If this number is very high, the 97 | /// Model may return fewer predictions per frame. Default value is 50. 98 | #[prost(int32, tag = "2")] 99 | pub max_predictions: i32, 100 | /// Only bounding boxes with shortest edge at least that long as a relative 101 | /// value of video frame size are returned. Default value is 0.0. 102 | #[prost(float, tag = "3")] 103 | pub min_bounding_box_size: f32, 104 | } 105 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.retail.logging.rs: -------------------------------------------------------------------------------- 1 | /// Describes a running service that sends errors. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ServiceContext { 4 | /// An identifier of the service. 5 | /// For example, "retail.googleapis.com". 6 | #[prost(string, tag = "1")] 7 | pub service: ::prost::alloc::string::String, 8 | } 9 | /// HTTP request data that is related to a reported error. 10 | #[derive(Clone, PartialEq, ::prost::Message)] 11 | pub struct HttpRequestContext { 12 | /// The HTTP response status code for the request. 13 | #[prost(int32, tag = "1")] 14 | pub response_status_code: i32, 15 | } 16 | /// Indicates a location in the source code of the service for which 17 | /// errors are reported. 18 | #[derive(Clone, PartialEq, ::prost::Message)] 19 | pub struct SourceLocation { 20 | /// Human-readable name of a function or method. 21 | /// For example, "google.cloud.retail.v2.UserEventService.ImportUserEvents". 22 | #[prost(string, tag = "1")] 23 | pub function_name: ::prost::alloc::string::String, 24 | } 25 | /// A description of the context in which an error occurred. 26 | #[derive(Clone, PartialEq, ::prost::Message)] 27 | pub struct ErrorContext { 28 | /// The HTTP request which was processed when the error was triggered. 29 | #[prost(message, optional, tag = "1")] 30 | pub http_request: ::core::option::Option, 31 | /// The location in the source code where the decision was made to 32 | /// report the error, usually the place where it was logged. 33 | #[prost(message, optional, tag = "2")] 34 | pub report_location: ::core::option::Option, 35 | } 36 | /// The error payload that is populated on LRO import APIs. Including: 37 | /// "google.cloud.retail.v2.ProductService.ImportProducts" 38 | /// "google.cloud.retail.v2.EventService.ImportUserEvents" 39 | #[derive(Clone, PartialEq, ::prost::Message)] 40 | pub struct ImportErrorContext { 41 | /// The operation resource name of the LRO. 42 | #[prost(string, tag = "1")] 43 | pub operation_name: ::prost::alloc::string::String, 44 | /// Cloud Storage file path of the import source. 45 | /// Can be set for batch operation error. 46 | #[prost(string, tag = "2")] 47 | pub gcs_path: ::prost::alloc::string::String, 48 | /// Line number of the content in file. 49 | /// Should be empty for permission or batch operation error. 50 | #[prost(string, tag = "3")] 51 | pub line_number: ::prost::alloc::string::String, 52 | /// Detailed content which caused the error. 53 | /// Should be empty for permission or batch operation error. 54 | #[prost(oneof = "import_error_context::LineContent", tags = "4, 5, 6")] 55 | pub line_content: ::core::option::Option, 56 | } 57 | /// Nested message and enum types in `ImportErrorContext`. 58 | pub mod import_error_context { 59 | /// Detailed content which caused the error. 60 | /// Should be empty for permission or batch operation error. 61 | #[derive(Clone, PartialEq, ::prost::Oneof)] 62 | pub enum LineContent { 63 | /// The detailed content which caused the error on importing a catalog item. 64 | #[prost(string, tag = "4")] 65 | CatalogItem(::prost::alloc::string::String), 66 | /// The detailed content which caused the error on importing a product. 67 | #[prost(string, tag = "5")] 68 | Product(::prost::alloc::string::String), 69 | /// The detailed content which caused the error on importing a user event. 70 | #[prost(string, tag = "6")] 71 | UserEvent(::prost::alloc::string::String), 72 | } 73 | } 74 | /// An error log which is reported to the Error Reporting system. 75 | /// This proto a superset of 76 | /// google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent. 77 | #[derive(Clone, PartialEq, ::prost::Message)] 78 | pub struct ErrorLog { 79 | /// The service context in which this error has occurred. 80 | #[prost(message, optional, tag = "1")] 81 | pub service_context: ::core::option::Option, 82 | /// A description of the context in which the error occurred. 83 | #[prost(message, optional, tag = "2")] 84 | pub context: ::core::option::Option, 85 | /// A message describing the error. 86 | #[prost(string, tag = "3")] 87 | pub message: ::prost::alloc::string::String, 88 | /// The RPC status associated with the error log. 89 | #[prost(message, optional, tag = "4")] 90 | pub status: ::core::option::Option, 91 | /// The API request payload, represented as a protocol buffer. 92 | /// 93 | /// Most API request types are supported. For example: 94 | /// 95 | /// "type.googleapis.com/google.cloud.retail.v2.ProductService.CreateProductRequest" 96 | /// "type.googleapis.com/google.cloud.retail.v2.UserEventService.WriteUserEventRequest" 97 | #[prost(message, optional, tag = "5")] 98 | pub request_payload: ::core::option::Option<::prost_types::Struct>, 99 | /// The API response payload, represented as a protocol buffer. 100 | /// 101 | /// This is used to log some "soft errors", where the response is valid but we 102 | /// consider there are some quality issues like unjoined events. 103 | /// 104 | /// The following API responses are supported and no PII is included: 105 | /// "google.cloud.retail.v2.PredictionService.Predict" 106 | /// "google.cloud.retail.v2.UserEventService.WriteUserEvent" 107 | /// "google.cloud.retail.v2.UserEventService.CollectUserEvent" 108 | #[prost(message, optional, tag = "6")] 109 | pub response_payload: ::core::option::Option<::prost_types::Struct>, 110 | /// The error payload that is populated on LRO import APIs. 111 | #[prost(message, optional, tag = "7")] 112 | pub import_payload: ::core::option::Option, 113 | } 114 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.iap.v1beta1.rs: -------------------------------------------------------------------------------- 1 | #[doc = r" Generated client implementations."] 2 | pub mod identity_aware_proxy_admin_v1_beta1_client { 3 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 4 | use tonic::codegen::*; 5 | #[doc = " APIs for Identity-Aware Proxy Admin configurations."] 6 | #[derive(Debug, Clone)] 7 | pub struct IdentityAwareProxyAdminV1Beta1Client { 8 | inner: tonic::client::Grpc, 9 | } 10 | impl IdentityAwareProxyAdminV1Beta1Client 11 | where 12 | T: tonic::client::GrpcService, 13 | T::ResponseBody: Body + Send + 'static, 14 | T::Error: Into, 15 | ::Error: Into + Send, 16 | { 17 | pub fn new(inner: T) -> Self { 18 | let inner = tonic::client::Grpc::new(inner); 19 | Self { inner } 20 | } 21 | pub fn with_interceptor( 22 | inner: T, 23 | interceptor: F, 24 | ) -> IdentityAwareProxyAdminV1Beta1Client> 25 | where 26 | F: tonic::service::Interceptor, 27 | T: tonic::codegen::Service< 28 | http::Request, 29 | Response = http::Response< 30 | >::ResponseBody, 31 | >, 32 | >, 33 | >>::Error: 34 | Into + Send + Sync, 35 | { 36 | IdentityAwareProxyAdminV1Beta1Client::new(InterceptedService::new(inner, interceptor)) 37 | } 38 | #[doc = r" Compress requests with `gzip`."] 39 | #[doc = r""] 40 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 41 | #[doc = r" error."] 42 | pub fn send_gzip(mut self) -> Self { 43 | self.inner = self.inner.send_gzip(); 44 | self 45 | } 46 | #[doc = r" Enable decompressing responses with `gzip`."] 47 | pub fn accept_gzip(mut self) -> Self { 48 | self.inner = self.inner.accept_gzip(); 49 | self 50 | } 51 | #[doc = " Sets the access control policy for an Identity-Aware Proxy protected"] 52 | #[doc = " resource. Replaces any existing policy."] 53 | #[doc = " More information about managing access via IAP can be found at:"] 54 | #[doc = " https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api"] 55 | pub async fn set_iam_policy( 56 | &mut self, 57 | request: impl tonic::IntoRequest, 58 | ) -> Result, tonic::Status> 59 | { 60 | self.inner.ready().await.map_err(|e| { 61 | tonic::Status::new( 62 | tonic::Code::Unknown, 63 | format!("Service was not ready: {}", e.into()), 64 | ) 65 | })?; 66 | let codec = tonic::codec::ProstCodec::default(); 67 | let path = http::uri::PathAndQuery::from_static( 68 | "/google.cloud.iap.v1beta1.IdentityAwareProxyAdminV1Beta1/SetIamPolicy", 69 | ); 70 | self.inner.unary(request.into_request(), path, codec).await 71 | } 72 | #[doc = " Gets the access control policy for an Identity-Aware Proxy protected"] 73 | #[doc = " resource."] 74 | #[doc = " More information about managing access via IAP can be found at:"] 75 | #[doc = " https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api"] 76 | pub async fn get_iam_policy( 77 | &mut self, 78 | request: impl tonic::IntoRequest, 79 | ) -> Result, tonic::Status> 80 | { 81 | self.inner.ready().await.map_err(|e| { 82 | tonic::Status::new( 83 | tonic::Code::Unknown, 84 | format!("Service was not ready: {}", e.into()), 85 | ) 86 | })?; 87 | let codec = tonic::codec::ProstCodec::default(); 88 | let path = http::uri::PathAndQuery::from_static( 89 | "/google.cloud.iap.v1beta1.IdentityAwareProxyAdminV1Beta1/GetIamPolicy", 90 | ); 91 | self.inner.unary(request.into_request(), path, codec).await 92 | } 93 | #[doc = " Returns permissions that a caller has on the Identity-Aware Proxy protected"] 94 | #[doc = " resource. If the resource does not exist or the caller does not have"] 95 | #[doc = " Identity-Aware Proxy permissions a [google.rpc.Code.PERMISSION_DENIED]"] 96 | #[doc = " will be returned."] 97 | #[doc = " More information about managing access via IAP can be found at:"] 98 | #[doc = " https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api"] 99 | pub async fn test_iam_permissions( 100 | &mut self, 101 | request: impl tonic::IntoRequest< 102 | super::super::super::super::iam::v1::TestIamPermissionsRequest, 103 | >, 104 | ) -> Result< 105 | tonic::Response, 106 | tonic::Status, 107 | > { 108 | self.inner.ready().await.map_err(|e| { 109 | tonic::Status::new( 110 | tonic::Code::Unknown, 111 | format!("Service was not ready: {}", e.into()), 112 | ) 113 | })?; 114 | let codec = tonic::codec::ProstCodec::default(); 115 | let path = http::uri::PathAndQuery::from_static( 116 | "/google.cloud.iap.v1beta1.IdentityAwareProxyAdminV1Beta1/TestIamPermissions", 117 | ); 118 | self.inner.unary(request.into_request(), path, codec).await 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /googapis/genproto/google.apps.script.r#type.gmail.rs: -------------------------------------------------------------------------------- 1 | /// Properties customizing the appearance and execution of a Gmail add-on. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct GmailAddOnManifest { 4 | /// Defines an endpoint that will be executed in contexts that don't 5 | /// match a declared contextual trigger. Any cards generated by this function 6 | /// will always be available to the user, but may be eclipsed by contextual 7 | /// content when this add-on declares more targeted triggers. 8 | /// 9 | /// If present, this overrides the configuration from 10 | /// `addOns.common.homepageTrigger`. 11 | #[prost(message, optional, tag = "14")] 12 | pub homepage_trigger: ::core::option::Option, 13 | /// Defines the set of conditions that trigger the add-on. 14 | #[prost(message, repeated, tag = "3")] 15 | pub contextual_triggers: ::prost::alloc::vec::Vec, 16 | /// Defines set of [universal 17 | /// actions](/gmail/add-ons/how-tos/universal-actions) for the add-on. The user 18 | /// triggers universal actions from the add-on toolbar menu. 19 | #[prost(message, repeated, tag = "4")] 20 | pub universal_actions: ::prost::alloc::vec::Vec, 21 | /// Defines the compose time trigger for a compose time add-on. This is the 22 | /// trigger that causes an add-on to take action when the user is composing an 23 | /// email. 24 | /// All compose time addons are required to have the 25 | /// gmail.addons.current.action.compose scope even though it might not edit the 26 | /// draft. 27 | #[prost(message, optional, tag = "12")] 28 | pub compose_trigger: ::core::option::Option, 29 | /// The name of an endpoint that verifies that the add-on has 30 | /// all the required third-party authorizations, by probing the third-party 31 | /// APIs. If the probe fails, the function should throw an exception to 32 | /// initiate the authorization flow. This function is called before each 33 | /// invocation of the add-on, in order to ensure a smooth user experience. 34 | #[prost(string, tag = "7")] 35 | pub authorization_check_function: ::prost::alloc::string::String, 36 | } 37 | /// An action that is always available in the add-on toolbar menu regardless of 38 | /// message context. 39 | #[derive(Clone, PartialEq, ::prost::Message)] 40 | pub struct UniversalAction { 41 | /// Required. User-visible text describing the action, for example, "Add a new 42 | /// contact." 43 | #[prost(string, tag = "1")] 44 | pub text: ::prost::alloc::string::String, 45 | /// The type of the action determines the behavior of Gmail when the user 46 | /// invokes the action. 47 | #[prost(oneof = "universal_action::ActionType", tags = "2, 3")] 48 | pub action_type: ::core::option::Option, 49 | } 50 | /// Nested message and enum types in `UniversalAction`. 51 | pub mod universal_action { 52 | /// The type of the action determines the behavior of Gmail when the user 53 | /// invokes the action. 54 | #[derive(Clone, PartialEq, ::prost::Oneof)] 55 | pub enum ActionType { 56 | /// A link that is opened by Gmail when the user triggers the action. 57 | #[prost(string, tag = "2")] 58 | OpenLink(::prost::alloc::string::String), 59 | /// An endpoint that is called when the user triggers the 60 | /// action. See the [universal actions 61 | /// guide](/gmail/add-ons/how-tos/universal-actions) for details. 62 | #[prost(string, tag = "3")] 63 | RunFunction(::prost::alloc::string::String), 64 | } 65 | } 66 | /// A trigger that activates when user is composing an email. 67 | #[derive(Clone, PartialEq, ::prost::Message)] 68 | pub struct ComposeTrigger { 69 | /// Defines the set of actions for compose time add-on. These are actions 70 | /// that user can trigger on a compose time addon. 71 | #[prost(message, repeated, tag = "5")] 72 | pub actions: ::prost::alloc::vec::Vec, 73 | /// Define the level of data access when a compose time addon is triggered. 74 | #[prost(enumeration = "compose_trigger::DraftAccess", tag = "4")] 75 | pub draft_access: i32, 76 | } 77 | /// Nested message and enum types in `ComposeTrigger`. 78 | pub mod compose_trigger { 79 | /// An enum defining the level of data access this compose trigger requires. 80 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 81 | #[repr(i32)] 82 | pub enum DraftAccess { 83 | /// Default value when nothing is set for DraftAccess. 84 | Unspecified = 0, 85 | /// NONE means compose trigger won't be able to access any data of the draft 86 | /// when a compose addon is triggered. 87 | None = 1, 88 | /// METADATA gives compose trigger the permission to access the metadata of 89 | /// the draft when a compose addon is triggered. This includes the audience 90 | /// list (To/cc list) of a draft message. 91 | Metadata = 2, 92 | } 93 | } 94 | /// Defines a trigger that fires when the open email meets a specific criteria. 95 | /// When the trigger fires, it executes a specific endpoint, usually 96 | /// in order to create new cards and update the UI. 97 | #[derive(Clone, PartialEq, ::prost::Message)] 98 | pub struct ContextualTrigger { 99 | /// Required. The name of the endpoint to call when a message matches the 100 | /// trigger. 101 | #[prost(string, tag = "4")] 102 | pub on_trigger_function: ::prost::alloc::string::String, 103 | /// The type of trigger determines the conditions Gmail uses to show the 104 | /// add-on. 105 | #[prost(oneof = "contextual_trigger::Trigger", tags = "1")] 106 | pub trigger: ::core::option::Option, 107 | } 108 | /// Nested message and enum types in `ContextualTrigger`. 109 | pub mod contextual_trigger { 110 | /// The type of trigger determines the conditions Gmail uses to show the 111 | /// add-on. 112 | #[derive(Clone, PartialEq, ::prost::Oneof)] 113 | pub enum Trigger { 114 | /// UnconditionalTriggers are executed when any mail message is opened. 115 | #[prost(message, tag = "1")] 116 | Unconditional(super::UnconditionalTrigger), 117 | } 118 | } 119 | /// A trigger that fires when any email message is opened. 120 | #[derive(Clone, PartialEq, ::prost::Message)] 121 | pub struct UnconditionalTrigger {} 122 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gaming.allocationendpoint.v1alpha.rs: -------------------------------------------------------------------------------- 1 | #[derive(Clone, PartialEq, ::prost::Message)] 2 | pub struct AllocationRequest { 3 | /// The required realm name in the following form: 4 | /// `{location}/{realm}`. 5 | #[prost(string, tag = "1")] 6 | pub realm: ::prost::alloc::string::String, 7 | /// The default game server deployment name. 8 | /// This is used to increase the likelihood of a successful 9 | /// allocation. 10 | #[prost(string, tag = "2")] 11 | pub default_game_server_deployment: ::prost::alloc::string::String, 12 | /// The ordered list of game server labels to match for allocations. 13 | /// If the first game server selector is not matched, the selection attempts 14 | /// the second game server selector, and so on. 15 | #[prost(message, repeated, tag = "3")] 16 | pub game_server_selectors: ::prost::alloc::vec::Vec, 17 | /// Metadata is optional custom metadata that is added to the game server at 18 | /// allocation. You can use this to tell the server necessary session data. 19 | #[prost(message, optional, tag = "4")] 20 | pub metadata: ::core::option::Option, 21 | } 22 | #[derive(Clone, PartialEq, ::prost::Message)] 23 | pub struct AllocationResponse { 24 | /// The name of the allocated game server. 25 | #[prost(string, tag = "1")] 26 | pub game_server_name: ::prost::alloc::string::String, 27 | /// The allocated game server's port information. 28 | #[prost(message, repeated, tag = "2")] 29 | pub ports: ::prost::alloc::vec::Vec, 30 | /// The address of the allocated game server. 31 | #[prost(string, tag = "3")] 32 | pub address: ::prost::alloc::string::String, 33 | /// The node name of the allocated game server. 34 | #[prost(string, tag = "4")] 35 | pub node_name: ::prost::alloc::string::String, 36 | /// The game server cluster from which the game server was allocated. 37 | #[prost(string, tag = "5")] 38 | pub game_server_cluster_name: ::prost::alloc::string::String, 39 | /// The game server deployment from which the game server was allocated. 40 | #[prost(string, tag = "6")] 41 | pub deployment_name: ::prost::alloc::string::String, 42 | } 43 | /// Nested message and enum types in `AllocationResponse`. 44 | pub mod allocation_response { 45 | /// The game server port info that is allocated. 46 | #[derive(Clone, PartialEq, ::prost::Message)] 47 | pub struct GameServerStatusPort { 48 | #[prost(string, tag = "1")] 49 | pub name: ::prost::alloc::string::String, 50 | #[prost(int32, tag = "2")] 51 | pub port: i32, 52 | } 53 | } 54 | /// MetaPatch is the metadata used to patch the Game Server metadata on 55 | /// allocation. It behaves exactly as it does in OSS. 56 | #[derive(Clone, PartialEq, ::prost::Message)] 57 | pub struct MetaPatch { 58 | #[prost(map = "string, string", tag = "1")] 59 | pub labels: 60 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 61 | #[prost(map = "string, string", tag = "2")] 62 | pub annotations: 63 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 64 | } 65 | /// GameServerSelector used for finding a GameServer with matching labels. 66 | #[derive(Clone, PartialEq, ::prost::Message)] 67 | pub struct GameServerSelector { 68 | /// Labels to match. 69 | #[prost(map = "string, string", tag = "1")] 70 | pub match_labels: 71 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 72 | } 73 | #[doc = r" Generated client implementations."] 74 | pub mod allocation_endpoint_service_client { 75 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 76 | use tonic::codegen::*; 77 | #[derive(Debug, Clone)] 78 | pub struct AllocationEndpointServiceClient { 79 | inner: tonic::client::Grpc, 80 | } 81 | impl AllocationEndpointServiceClient 82 | where 83 | T: tonic::client::GrpcService, 84 | T::ResponseBody: Body + Send + 'static, 85 | T::Error: Into, 86 | ::Error: Into + Send, 87 | { 88 | pub fn new(inner: T) -> Self { 89 | let inner = tonic::client::Grpc::new(inner); 90 | Self { inner } 91 | } 92 | pub fn with_interceptor( 93 | inner: T, 94 | interceptor: F, 95 | ) -> AllocationEndpointServiceClient> 96 | where 97 | F: tonic::service::Interceptor, 98 | T: tonic::codegen::Service< 99 | http::Request, 100 | Response = http::Response< 101 | >::ResponseBody, 102 | >, 103 | >, 104 | >>::Error: 105 | Into + Send + Sync, 106 | { 107 | AllocationEndpointServiceClient::new(InterceptedService::new(inner, interceptor)) 108 | } 109 | #[doc = r" Compress requests with `gzip`."] 110 | #[doc = r""] 111 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 112 | #[doc = r" error."] 113 | pub fn send_gzip(mut self) -> Self { 114 | self.inner = self.inner.send_gzip(); 115 | self 116 | } 117 | #[doc = r" Enable decompressing responses with `gzip`."] 118 | pub fn accept_gzip(mut self) -> Self { 119 | self.inner = self.inner.accept_gzip(); 120 | self 121 | } 122 | #[doc = " Proxy allocation service to the Game Server Clusters."] 123 | pub async fn allocate( 124 | &mut self, 125 | request: impl tonic::IntoRequest, 126 | ) -> Result, tonic::Status> { 127 | self.inner.ready().await.map_err(|e| { 128 | tonic::Status::new( 129 | tonic::Code::Unknown, 130 | format!("Service was not ready: {}", e.into()), 131 | ) 132 | })?; 133 | let codec = tonic::codec::ProstCodec::default(); 134 | let path = http :: uri :: PathAndQuery :: from_static ("/google.cloud.gaming.allocationendpoint.v1alpha.AllocationEndpointService/Allocate") ; 135 | self.inner.unary(request.into_request(), path, codec).await 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /googapis/genproto/google.actions.sdk.v2.interactionmodel.r#type.rs: -------------------------------------------------------------------------------- 1 | /// A reference to a class which is used to declare the type of a field or return 2 | /// value. Enums are also a type of class that can be referenced using 3 | /// ClassReference. 4 | #[derive(Clone, PartialEq, ::prost::Message)] 5 | pub struct ClassReference { 6 | /// Required. Name of a built-in type or custom type of the parameter. Examples: 7 | /// `PizzaToppings`, `actions.type.Number` 8 | #[prost(string, tag = "1")] 9 | pub name: ::prost::alloc::string::String, 10 | /// Optional. Indicates whether the data type represents a list of values. 11 | #[prost(bool, tag = "2")] 12 | pub list: bool, 13 | } 14 | /// Elements that will be displayed on the canvas once a particular type's entity 15 | /// is extracted from a query. Only relevant for canvas enabled apps. 16 | /// **This message is localizable.** 17 | #[derive(Clone, PartialEq, ::prost::Message)] 18 | pub struct EntityDisplay { 19 | /// Optional. Title of the icon. 20 | #[prost(string, tag = "1")] 21 | pub icon_title: ::prost::alloc::string::String, 22 | /// Required. Url of the icon. 23 | #[prost(string, tag = "2")] 24 | pub icon_url: ::prost::alloc::string::String, 25 | } 26 | /// Type that matches any text if surrounding words context is close to provided 27 | /// training examples. 28 | #[derive(Clone, PartialEq, ::prost::Message)] 29 | pub struct FreeTextType { 30 | /// Optional. Elements that will be displayed on the canvas once an entity is extracted 31 | /// from a query. Only relevant for canvas enabled apps. 32 | #[prost(message, optional, tag = "2")] 33 | pub display: ::core::option::Option, 34 | } 35 | /// Type that matches text by regular expressions. 36 | /// **This message is localizable.** 37 | #[derive(Clone, PartialEq, ::prost::Message)] 38 | pub struct RegularExpressionType { 39 | /// Required. Named map of entities which each contain Regex strings. 40 | #[prost(map = "string, message", tag = "1")] 41 | pub entities: ::std::collections::HashMap< 42 | ::prost::alloc::string::String, 43 | regular_expression_type::Entity, 44 | >, 45 | } 46 | /// Nested message and enum types in `RegularExpressionType`. 47 | pub mod regular_expression_type { 48 | /// Represents an entity object that contains the regular expression that is 49 | /// used for comparison. 50 | #[derive(Clone, PartialEq, ::prost::Message)] 51 | pub struct Entity { 52 | /// Optional. Elements that will be displayed on the canvas once an entity is 53 | /// extracted from a query. Only relevant for canvas enabled apps. 54 | #[prost(message, optional, tag = "1")] 55 | pub display: ::core::option::Option, 56 | /// Required. Uses RE2 regex syntax (See 57 | /// for more details) 58 | #[prost(string, repeated, tag = "2")] 59 | pub regular_expressions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 60 | } 61 | } 62 | /// Type that matches text by set of synonyms. 63 | #[derive(Clone, PartialEq, ::prost::Message)] 64 | pub struct SynonymType { 65 | /// Optional. The match type for the synonym. 66 | #[prost(enumeration = "synonym_type::MatchType", tag = "1")] 67 | pub match_type: i32, 68 | /// Optional. When set to true this will match unknown words or phrases based on 69 | /// surrounding input and intent training data, such as items that might be 70 | /// added to a grocery list. 71 | #[prost(bool, tag = "3")] 72 | pub accept_unknown_values: bool, 73 | /// Required. Named map of synonym entities. 74 | #[prost(map = "string, message", tag = "2")] 75 | pub entities: ::std::collections::HashMap<::prost::alloc::string::String, synonym_type::Entity>, 76 | } 77 | /// Nested message and enum types in `SynonymType`. 78 | pub mod synonym_type { 79 | /// Represents a synonym entity field that contains the details of a single 80 | /// entry inside the type. 81 | #[derive(Clone, PartialEq, ::prost::Message)] 82 | pub struct Entity { 83 | /// Optional. The entity display details. 84 | #[prost(message, optional, tag = "1")] 85 | pub display: ::core::option::Option, 86 | /// Optional. The list of synonyms for the entity. 87 | /// **This field is localizable.** 88 | #[prost(string, repeated, tag = "2")] 89 | pub synonyms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 90 | } 91 | /// The type of matching that entries in this type will use. This will ensure 92 | /// all of the types use the same matching method and allow variation of 93 | /// matching for synonym matching (i.e. fuzzy versus exact). If the value is 94 | /// `UNSPECIFIED` it will be defaulted to `EXACT_MATCH`. 95 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 96 | #[repr(i32)] 97 | pub enum MatchType { 98 | /// Defaults to `EXACT_MATCH`. 99 | Unspecified = 0, 100 | /// Looks for an exact match of the synonym or name. 101 | ExactMatch = 1, 102 | /// Looser than `EXACT_MATCH`. Looks for similar matches as well as exact 103 | /// matches. 104 | FuzzyMatch = 2, 105 | } 106 | } 107 | /// Declaration of a custom type, as opposed to built-in types. Types can be 108 | /// assigned to slots in a scene or parameters of an intent's training phrases. 109 | /// Practically, Types can be thought of as enums. 110 | /// Note, type name is specified in the name of the file. 111 | #[derive(Clone, PartialEq, ::prost::Message)] 112 | pub struct Type { 113 | /// Set of exceptional words/phrases that shouldn't be matched by type. 114 | /// Note: If word/phrase is matched by the type but listed as an exclusion it 115 | /// won't be returned in parameter extraction result. 116 | /// **This field is localizable.** 117 | #[prost(string, repeated, tag = "4")] 118 | pub exclusions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 119 | /// Selection of sub type based on the type of matching to be done. 120 | #[prost(oneof = "r#type::SubType", tags = "1, 2, 3")] 121 | pub sub_type: ::core::option::Option, 122 | } 123 | /// Nested message and enum types in `Type`. 124 | pub mod r#type { 125 | /// Selection of sub type based on the type of matching to be done. 126 | #[derive(Clone, PartialEq, ::prost::Oneof)] 127 | pub enum SubType { 128 | /// Synonyms type, which is essentially an enum. 129 | #[prost(message, tag = "1")] 130 | Synonym(super::SynonymType), 131 | /// Regex type, allows regular expression matching. 132 | #[prost(message, tag = "2")] 133 | RegularExpression(super::RegularExpressionType), 134 | /// FreeText type. 135 | #[prost(message, tag = "3")] 136 | FreeText(super::FreeTextType), 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.location.rs: -------------------------------------------------------------------------------- 1 | /// The request message for \[Locations.ListLocations][google.cloud.location.Locations.ListLocations\]. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ListLocationsRequest { 4 | /// The resource that owns the locations collection, if applicable. 5 | #[prost(string, tag = "1")] 6 | pub name: ::prost::alloc::string::String, 7 | /// The standard list filter. 8 | #[prost(string, tag = "2")] 9 | pub filter: ::prost::alloc::string::String, 10 | /// The standard list page size. 11 | #[prost(int32, tag = "3")] 12 | pub page_size: i32, 13 | /// The standard list page token. 14 | #[prost(string, tag = "4")] 15 | pub page_token: ::prost::alloc::string::String, 16 | } 17 | /// The response message for \[Locations.ListLocations][google.cloud.location.Locations.ListLocations\]. 18 | #[derive(Clone, PartialEq, ::prost::Message)] 19 | pub struct ListLocationsResponse { 20 | /// A list of locations that matches the specified filter in the request. 21 | #[prost(message, repeated, tag = "1")] 22 | pub locations: ::prost::alloc::vec::Vec, 23 | /// The standard List next-page token. 24 | #[prost(string, tag = "2")] 25 | pub next_page_token: ::prost::alloc::string::String, 26 | } 27 | /// The request message for \[Locations.GetLocation][google.cloud.location.Locations.GetLocation\]. 28 | #[derive(Clone, PartialEq, ::prost::Message)] 29 | pub struct GetLocationRequest { 30 | /// Resource name for the location. 31 | #[prost(string, tag = "1")] 32 | pub name: ::prost::alloc::string::String, 33 | } 34 | /// A resource that represents Google Cloud Platform location. 35 | #[derive(Clone, PartialEq, ::prost::Message)] 36 | pub struct Location { 37 | /// Resource name for the location, which may vary between implementations. 38 | /// For example: `"projects/example-project/locations/us-east1"` 39 | #[prost(string, tag = "1")] 40 | pub name: ::prost::alloc::string::String, 41 | /// The canonical id for this location. For example: `"us-east1"`. 42 | #[prost(string, tag = "4")] 43 | pub location_id: ::prost::alloc::string::String, 44 | /// The friendly name for this location, typically a nearby city name. 45 | /// For example, "Tokyo". 46 | #[prost(string, tag = "5")] 47 | pub display_name: ::prost::alloc::string::String, 48 | /// Cross-service attributes for the location. For example 49 | /// 50 | /// {"cloud.googleapis.com/region": "us-east1"} 51 | #[prost(map = "string, string", tag = "2")] 52 | pub labels: 53 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 54 | /// Service-specific metadata. For example the available capacity at the given 55 | /// location. 56 | #[prost(message, optional, tag = "3")] 57 | pub metadata: ::core::option::Option<::prost_types::Any>, 58 | } 59 | #[doc = r" Generated client implementations."] 60 | pub mod locations_client { 61 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 62 | use tonic::codegen::*; 63 | #[doc = " An abstract interface that provides location-related information for"] 64 | #[doc = " a service. Service-specific metadata is provided through the"] 65 | #[doc = " [Location.metadata][google.cloud.location.Location.metadata] field."] 66 | #[derive(Debug, Clone)] 67 | pub struct LocationsClient { 68 | inner: tonic::client::Grpc, 69 | } 70 | impl LocationsClient 71 | where 72 | T: tonic::client::GrpcService, 73 | T::ResponseBody: Body + Send + 'static, 74 | T::Error: Into, 75 | ::Error: Into + Send, 76 | { 77 | pub fn new(inner: T) -> Self { 78 | let inner = tonic::client::Grpc::new(inner); 79 | Self { inner } 80 | } 81 | pub fn with_interceptor( 82 | inner: T, 83 | interceptor: F, 84 | ) -> LocationsClient> 85 | where 86 | F: tonic::service::Interceptor, 87 | T: tonic::codegen::Service< 88 | http::Request, 89 | Response = http::Response< 90 | >::ResponseBody, 91 | >, 92 | >, 93 | >>::Error: 94 | Into + Send + Sync, 95 | { 96 | LocationsClient::new(InterceptedService::new(inner, interceptor)) 97 | } 98 | #[doc = r" Compress requests with `gzip`."] 99 | #[doc = r""] 100 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 101 | #[doc = r" error."] 102 | pub fn send_gzip(mut self) -> Self { 103 | self.inner = self.inner.send_gzip(); 104 | self 105 | } 106 | #[doc = r" Enable decompressing responses with `gzip`."] 107 | pub fn accept_gzip(mut self) -> Self { 108 | self.inner = self.inner.accept_gzip(); 109 | self 110 | } 111 | #[doc = " Lists information about the supported locations for this service."] 112 | pub async fn list_locations( 113 | &mut self, 114 | request: impl tonic::IntoRequest, 115 | ) -> Result, tonic::Status> { 116 | self.inner.ready().await.map_err(|e| { 117 | tonic::Status::new( 118 | tonic::Code::Unknown, 119 | format!("Service was not ready: {}", e.into()), 120 | ) 121 | })?; 122 | let codec = tonic::codec::ProstCodec::default(); 123 | let path = http::uri::PathAndQuery::from_static( 124 | "/google.cloud.location.Locations/ListLocations", 125 | ); 126 | self.inner.unary(request.into_request(), path, codec).await 127 | } 128 | #[doc = " Gets information about a location."] 129 | pub async fn get_location( 130 | &mut self, 131 | request: impl tonic::IntoRequest, 132 | ) -> Result, tonic::Status> { 133 | self.inner.ready().await.map_err(|e| { 134 | tonic::Status::new( 135 | tonic::Code::Unknown, 136 | format!("Service was not ready: {}", e.into()), 137 | ) 138 | })?; 139 | let codec = tonic::codec::ProstCodec::default(); 140 | let path = http::uri::PathAndQuery::from_static( 141 | "/google.cloud.location.Locations/GetLocation", 142 | ); 143 | self.inner.unary(request.into_request(), path, codec).await 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /googapis/genproto/grafeas.v1beta1.source.rs: -------------------------------------------------------------------------------- 1 | /// A SourceContext is a reference to a tree of files. A SourceContext together 2 | /// with a path point to a unique revision of a single file or directory. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct SourceContext { 5 | /// Labels with user defined metadata. 6 | #[prost(map = "string, string", tag = "4")] 7 | pub labels: 8 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 9 | /// A SourceContext can refer any one of the following types of repositories. 10 | #[prost(oneof = "source_context::Context", tags = "1, 2, 3")] 11 | pub context: ::core::option::Option, 12 | } 13 | /// Nested message and enum types in `SourceContext`. 14 | pub mod source_context { 15 | /// A SourceContext can refer any one of the following types of repositories. 16 | #[derive(Clone, PartialEq, ::prost::Oneof)] 17 | pub enum Context { 18 | /// A SourceContext referring to a revision in a Google Cloud Source Repo. 19 | #[prost(message, tag = "1")] 20 | CloudRepo(super::CloudRepoSourceContext), 21 | /// A SourceContext referring to a Gerrit project. 22 | #[prost(message, tag = "2")] 23 | Gerrit(super::GerritSourceContext), 24 | /// A SourceContext referring to any third party Git repo (e.g., GitHub). 25 | #[prost(message, tag = "3")] 26 | Git(super::GitSourceContext), 27 | } 28 | } 29 | /// An alias to a repo revision. 30 | #[derive(Clone, PartialEq, ::prost::Message)] 31 | pub struct AliasContext { 32 | /// The alias kind. 33 | #[prost(enumeration = "alias_context::Kind", tag = "1")] 34 | pub kind: i32, 35 | /// The alias name. 36 | #[prost(string, tag = "2")] 37 | pub name: ::prost::alloc::string::String, 38 | } 39 | /// Nested message and enum types in `AliasContext`. 40 | pub mod alias_context { 41 | /// The type of an alias. 42 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 43 | #[repr(i32)] 44 | pub enum Kind { 45 | /// Unknown. 46 | Unspecified = 0, 47 | /// Git tag. 48 | Fixed = 1, 49 | /// Git branch. 50 | Movable = 2, 51 | /// Used to specify non-standard aliases. For example, if a Git repo has a 52 | /// ref named "refs/foo/bar". 53 | Other = 4, 54 | } 55 | } 56 | /// A CloudRepoSourceContext denotes a particular revision in a Google Cloud 57 | /// Source Repo. 58 | #[derive(Clone, PartialEq, ::prost::Message)] 59 | pub struct CloudRepoSourceContext { 60 | /// The ID of the repo. 61 | #[prost(message, optional, tag = "1")] 62 | pub repo_id: ::core::option::Option, 63 | /// A revision in a Cloud Repo can be identified by either its revision ID or 64 | /// its alias. 65 | #[prost(oneof = "cloud_repo_source_context::Revision", tags = "2, 3")] 66 | pub revision: ::core::option::Option, 67 | } 68 | /// Nested message and enum types in `CloudRepoSourceContext`. 69 | pub mod cloud_repo_source_context { 70 | /// A revision in a Cloud Repo can be identified by either its revision ID or 71 | /// its alias. 72 | #[derive(Clone, PartialEq, ::prost::Oneof)] 73 | pub enum Revision { 74 | /// A revision ID. 75 | #[prost(string, tag = "2")] 76 | RevisionId(::prost::alloc::string::String), 77 | /// An alias, which may be a branch or tag. 78 | #[prost(message, tag = "3")] 79 | AliasContext(super::AliasContext), 80 | } 81 | } 82 | /// A SourceContext referring to a Gerrit project. 83 | #[derive(Clone, PartialEq, ::prost::Message)] 84 | pub struct GerritSourceContext { 85 | /// The URI of a running Gerrit instance. 86 | #[prost(string, tag = "1")] 87 | pub host_uri: ::prost::alloc::string::String, 88 | /// The full project name within the host. Projects may be nested, so 89 | /// "project/subproject" is a valid project name. The "repo name" is the 90 | /// hostURI/project. 91 | #[prost(string, tag = "2")] 92 | pub gerrit_project: ::prost::alloc::string::String, 93 | /// A revision in a Gerrit project can be identified by either its revision ID 94 | /// or its alias. 95 | #[prost(oneof = "gerrit_source_context::Revision", tags = "3, 4")] 96 | pub revision: ::core::option::Option, 97 | } 98 | /// Nested message and enum types in `GerritSourceContext`. 99 | pub mod gerrit_source_context { 100 | /// A revision in a Gerrit project can be identified by either its revision ID 101 | /// or its alias. 102 | #[derive(Clone, PartialEq, ::prost::Oneof)] 103 | pub enum Revision { 104 | /// A revision (commit) ID. 105 | #[prost(string, tag = "3")] 106 | RevisionId(::prost::alloc::string::String), 107 | /// An alias, which may be a branch or tag. 108 | #[prost(message, tag = "4")] 109 | AliasContext(super::AliasContext), 110 | } 111 | } 112 | /// A GitSourceContext denotes a particular revision in a third party Git 113 | /// repository (e.g., GitHub). 114 | #[derive(Clone, PartialEq, ::prost::Message)] 115 | pub struct GitSourceContext { 116 | /// Git repository URL. 117 | #[prost(string, tag = "1")] 118 | pub url: ::prost::alloc::string::String, 119 | /// Git commit hash. 120 | #[prost(string, tag = "2")] 121 | pub revision_id: ::prost::alloc::string::String, 122 | } 123 | /// A unique identifier for a Cloud Repo. 124 | #[derive(Clone, PartialEq, ::prost::Message)] 125 | pub struct RepoId { 126 | /// A cloud repo can be identified by either its project ID and repository name 127 | /// combination, or its globally unique identifier. 128 | #[prost(oneof = "repo_id::Id", tags = "1, 2")] 129 | pub id: ::core::option::Option, 130 | } 131 | /// Nested message and enum types in `RepoId`. 132 | pub mod repo_id { 133 | /// A cloud repo can be identified by either its project ID and repository name 134 | /// combination, or its globally unique identifier. 135 | #[derive(Clone, PartialEq, ::prost::Oneof)] 136 | pub enum Id { 137 | /// A combination of a project ID and a repo name. 138 | #[prost(message, tag = "1")] 139 | ProjectRepoId(super::ProjectRepoId), 140 | /// A server-assigned, globally unique identifier. 141 | #[prost(string, tag = "2")] 142 | Uid(::prost::alloc::string::String), 143 | } 144 | } 145 | /// Selects a repo using a Google Cloud Platform project ID (e.g., 146 | /// winged-cargo-31) and a repo name within that project. 147 | #[derive(Clone, PartialEq, ::prost::Message)] 148 | pub struct ProjectRepoId { 149 | /// The ID of the project. 150 | #[prost(string, tag = "1")] 151 | pub project_id: ::prost::alloc::string::String, 152 | /// The name of the repo. Leave empty for the default repo. 153 | #[prost(string, tag = "2")] 154 | pub repo_name: ::prost::alloc::string::String, 155 | } 156 | -------------------------------------------------------------------------------- /googapis/genproto/google.firebase.fcm.connection.v1alpha1.rs: -------------------------------------------------------------------------------- 1 | /// Request sent to FCM from the connected client. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct UpstreamRequest { 4 | /// The type of request the client is making to FCM. 5 | #[prost(oneof = "upstream_request::RequestType", tags = "1")] 6 | pub request_type: ::core::option::Option, 7 | } 8 | /// Nested message and enum types in `UpstreamRequest`. 9 | pub mod upstream_request { 10 | /// The type of request the client is making to FCM. 11 | #[derive(Clone, PartialEq, ::prost::Oneof)] 12 | pub enum RequestType { 13 | /// Message acknowledgement. 14 | #[prost(message, tag = "1")] 15 | Ack(super::Ack), 16 | } 17 | } 18 | /// Response sent to the connected client from FCM. 19 | #[derive(Clone, PartialEq, ::prost::Message)] 20 | pub struct DownstreamResponse { 21 | /// The type of response FCM is sending to the client. 22 | #[prost(oneof = "downstream_response::ResponseType", tags = "1")] 23 | pub response_type: ::core::option::Option, 24 | } 25 | /// Nested message and enum types in `DownstreamResponse`. 26 | pub mod downstream_response { 27 | /// The type of response FCM is sending to the client. 28 | #[derive(Clone, PartialEq, ::prost::Oneof)] 29 | pub enum ResponseType { 30 | /// Message sent to FCM via the [Send 31 | /// API]() 32 | /// targeting this client. 33 | #[prost(message, tag = "1")] 34 | Message(super::Message), 35 | } 36 | } 37 | /// Acknowledgement to indicate a client successfully received an FCM message. 38 | /// 39 | /// If a message is not acked, FCM will continously resend the message until 40 | /// it expires. Duplicate delivery in this case is working as intended. 41 | #[derive(Clone, PartialEq, ::prost::Message)] 42 | pub struct Ack { 43 | /// Id of message being acknowledged 44 | #[prost(string, tag = "1")] 45 | pub message_id: ::prost::alloc::string::String, 46 | } 47 | /// Message created through the [Send 48 | /// API](). 49 | #[derive(Clone, PartialEq, ::prost::Message)] 50 | pub struct Message { 51 | /// The identifier of the message. Used to ack the message. 52 | #[prost(string, tag = "1")] 53 | pub message_id: ::prost::alloc::string::String, 54 | /// Time the message was received in FCM. 55 | #[prost(message, optional, tag = "2")] 56 | pub create_time: ::core::option::Option<::prost_types::Timestamp>, 57 | /// Expiry time of the message. Currently it is always 4 weeks. 58 | #[prost(message, optional, tag = "3")] 59 | pub expire_time: ::core::option::Option<::prost_types::Timestamp>, 60 | /// The arbitrary payload set in the [Send 61 | /// API](). 62 | #[prost(map = "string, string", tag = "4")] 63 | pub data: 64 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 65 | } 66 | #[doc = r" Generated client implementations."] 67 | pub mod connection_api_client { 68 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 69 | use tonic::codegen::*; 70 | #[doc = " FCM's service to create client connections to send/receive messages."] 71 | #[derive(Debug, Clone)] 72 | pub struct ConnectionApiClient { 73 | inner: tonic::client::Grpc, 74 | } 75 | impl ConnectionApiClient 76 | where 77 | T: tonic::client::GrpcService, 78 | T::ResponseBody: Body + Send + 'static, 79 | T::Error: Into, 80 | ::Error: Into + Send, 81 | { 82 | pub fn new(inner: T) -> Self { 83 | let inner = tonic::client::Grpc::new(inner); 84 | Self { inner } 85 | } 86 | pub fn with_interceptor( 87 | inner: T, 88 | interceptor: F, 89 | ) -> ConnectionApiClient> 90 | where 91 | F: tonic::service::Interceptor, 92 | T: tonic::codegen::Service< 93 | http::Request, 94 | Response = http::Response< 95 | >::ResponseBody, 96 | >, 97 | >, 98 | >>::Error: 99 | Into + Send + Sync, 100 | { 101 | ConnectionApiClient::new(InterceptedService::new(inner, interceptor)) 102 | } 103 | #[doc = r" Compress requests with `gzip`."] 104 | #[doc = r""] 105 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 106 | #[doc = r" error."] 107 | pub fn send_gzip(mut self) -> Self { 108 | self.inner = self.inner.send_gzip(); 109 | self 110 | } 111 | #[doc = r" Enable decompressing responses with `gzip`."] 112 | pub fn accept_gzip(mut self) -> Self { 113 | self.inner = self.inner.accept_gzip(); 114 | self 115 | } 116 | #[doc = " Creates a streaming connection with FCM to send messages and their"] 117 | #[doc = " respective ACKs."] 118 | #[doc = ""] 119 | #[doc = " The client credentials need to be passed in the [gRPC"] 120 | #[doc = " Metadata](https://grpc.io/docs/guides/concepts.html#metadata). The Format"] 121 | #[doc = " of the header is:"] 122 | #[doc = " Key: \"authorization\""] 123 | #[doc = " Value: \"Checkin [client_id:secret]\""] 124 | #[doc = ""] 125 | #[doc = ""] 126 | #[doc = " The project's API key also needs to be sent to authorize the project."] 127 | #[doc = " That can be set in the X-Goog-Api-Key Metadata header."] 128 | pub async fn connect( 129 | &mut self, 130 | request: impl tonic::IntoStreamingRequest, 131 | ) -> Result< 132 | tonic::Response>, 133 | tonic::Status, 134 | > { 135 | self.inner.ready().await.map_err(|e| { 136 | tonic::Status::new( 137 | tonic::Code::Unknown, 138 | format!("Service was not ready: {}", e.into()), 139 | ) 140 | })?; 141 | let codec = tonic::codec::ProstCodec::default(); 142 | let path = http::uri::PathAndQuery::from_static( 143 | "/google.firebase.fcm.connection.v1alpha1.ConnectionApi/Connect", 144 | ); 145 | self.inner.streaming(request.into_streaming_request(), path, codec).await 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.dataproc.logging.rs: -------------------------------------------------------------------------------- 1 | /// The short version of cluster configuration for Cloud logging. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ClusterSize { 4 | /// The number of primary workers in the cluster. 5 | #[prost(int32, tag = "1")] 6 | pub primary_worker_count: i32, 7 | /// The number of secondary workers in the cluster. 8 | #[prost(int32, tag = "2")] 9 | pub secondary_worker_count: i32, 10 | } 11 | /// The main proto that will be converted to JSON format and then written to 12 | /// Logging. 13 | #[derive(Clone, PartialEq, ::prost::Message)] 14 | pub struct AutoscalerLog { 15 | /// The current Autoscaler status. 16 | #[prost(message, optional, tag = "1")] 17 | pub status: ::core::option::Option, 18 | /// Optional. The autoscaling recommendation including its inputs, outputs, 19 | /// scaling decision, and detailed explanation. 20 | #[prost(message, optional, tag = "2")] 21 | pub recommendation: ::core::option::Option, 22 | } 23 | /// The Autoscaler's status, including its state and other details. 24 | #[derive(Clone, PartialEq, ::prost::Message)] 25 | pub struct AutoscalerStatus { 26 | /// The high-level Autoscaler state. 27 | #[prost(enumeration = "AutoscalerState", tag = "1")] 28 | pub state: i32, 29 | /// The detailed description of Autoscaler status. 30 | #[prost(string, tag = "2")] 31 | pub details: ::prost::alloc::string::String, 32 | /// The cluster update operation ID. 33 | #[prost(string, tag = "3")] 34 | pub update_cluster_operation_id: ::prost::alloc::string::String, 35 | /// Error message from an Autoscaler exception, if any. 36 | #[prost(string, tag = "4")] 37 | pub error: ::prost::alloc::string::String, 38 | } 39 | /// The inputs, outputs, and detailed explanation of the Autoscaling 40 | /// recommendation. 41 | #[derive(Clone, PartialEq, ::prost::Message)] 42 | pub struct AutoscalerRecommendation { 43 | /// The autoscaling algorithm inputs. 44 | #[prost(message, optional, tag = "1")] 45 | pub inputs: ::core::option::Option, 46 | /// The algorithm outputs for the recommended cluster size. 47 | #[prost(message, optional, tag = "2")] 48 | pub outputs: ::core::option::Option, 49 | } 50 | /// Nested message and enum types in `AutoscalerRecommendation`. 51 | pub mod autoscaler_recommendation { 52 | /// The input values for the Autoscaling recommendation alogirthm. 53 | #[derive(Clone, PartialEq, ::prost::Message)] 54 | pub struct Inputs { 55 | /// The metrics collected by the Dataproc agent running on the cluster. 56 | /// For example, {"avg-yarn-pending-memory": "1040 MB"} 57 | #[prost(map = "string, string", tag = "1")] 58 | pub cluster_metrics: ::std::collections::HashMap< 59 | ::prost::alloc::string::String, 60 | ::prost::alloc::string::String, 61 | >, 62 | /// The cluster configuration before updating the cluster. 63 | #[prost(message, optional, tag = "2")] 64 | pub current_cluster_size: ::core::option::Option, 65 | /// The minimum worker counts for each instance group. 66 | #[prost(message, optional, tag = "3")] 67 | pub min_worker_counts: ::core::option::Option, 68 | /// The maximum worker counts for each instance group. 69 | #[prost(message, optional, tag = "4")] 70 | pub max_worker_counts: ::core::option::Option, 71 | } 72 | /// Autoscaler recommendations. 73 | #[derive(Clone, PartialEq, ::prost::Message)] 74 | pub struct Outputs { 75 | /// The high-level autoscaling decision, such as SCALE_UP, SCALE_DOWN, 76 | /// NO_OP. 77 | #[prost(enumeration = "super::ScalingDecisionType", tag = "1")] 78 | pub decision: i32, 79 | /// The recommended cluster size. 80 | #[prost(message, optional, tag = "2")] 81 | pub recommended_cluster_size: ::core::option::Option, 82 | /// The graceful decommission timeout for downscaling operations. 83 | #[prost(message, optional, tag = "3")] 84 | pub graceful_decommission_timeout: ::core::option::Option<::prost_types::Duration>, 85 | /// Reasons why the Autoscaler didn't add or remove more workers. 86 | #[prost(enumeration = "super::ConstrainingFactor", repeated, tag = "4")] 87 | pub constraints_reached: ::prost::alloc::vec::Vec, 88 | /// Less significant recommendations that are not included in the 89 | /// `AutoscalerStatus.details` message. 90 | #[prost(string, repeated, tag = "5")] 91 | pub additional_recommendation_details: 92 | ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 93 | /// A unique id for this recommendation that should be included when opening 94 | /// a support ticket. 95 | #[prost(string, tag = "6")] 96 | pub recommendation_id: ::prost::alloc::string::String, 97 | } 98 | } 99 | /// The Autoscaler state. 100 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 101 | #[repr(i32)] 102 | pub enum AutoscalerState { 103 | Unspecified = 0, 104 | /// The Autoscaler is sleeping and waiting for the next update. 105 | Cooldown = 1, 106 | /// The Autoscaler is in the process of calculating its recommendation on 107 | /// whether to scale the cluster, and if so, how to autoscale. 108 | Recommending = 6, 109 | /// The Autoscaler is scaling the cluster. 110 | Scaling = 2, 111 | /// The Autoscaler has stopped. 112 | Stopped = 3, 113 | /// The Autoscaler has failed. 114 | Failed = 4, 115 | /// The Autoscaler is initializing. 116 | Initializing = 5, 117 | } 118 | /// The Autoscaling decision type. 119 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 120 | #[repr(i32)] 121 | pub enum ScalingDecisionType { 122 | Unspecified = 0, 123 | /// Increase the number of primary and/or secondary workers. 124 | ScaleUp = 1, 125 | /// Decrease the number of primary and/or secondary workers. 126 | ScaleDown = 2, 127 | /// Not changing the number of primary or secondary workers. 128 | NoScale = 3, 129 | /// Scale the primary and secondary worker groups in different directions. 130 | Mixed = 4, 131 | } 132 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 133 | #[repr(i32)] 134 | pub enum ConstrainingFactor { 135 | Unspecified = 0, 136 | /// The project does not have sufficient regional, global, and or preemptible 137 | /// quota to allocate a new VM. 138 | ScalingCappedDueToLackOfQuota = 1, 139 | /// All worker groups have reached maximum size. This message will not be 140 | /// issued if one group reached maximum size, but workers were able to be 141 | /// allocated to another group. 142 | ReachedMaximumClusterSize = 2, 143 | /// All worker groups have reached minimum size. This message will not be 144 | /// issued if workers were able to be removed from another group that had not 145 | /// reached minimum size. 146 | ReachedMinimumClusterSize = 3, 147 | } 148 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.gkeconnect.gateway.v1beta1.rs: -------------------------------------------------------------------------------- 1 | #[doc = r" Generated client implementations."] 2 | pub mod gateway_service_client { 3 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 4 | use tonic::codegen::*; 5 | #[doc = " Gateway service is a public API which works as a Kubernetes resource model"] 6 | #[doc = " proxy between end users and registered Kubernetes clusters. Each RPC in this"] 7 | #[doc = " service matches with an HTTP verb. End user will initiate kubectl commands"] 8 | #[doc = " against the Gateway service, and Gateway service will forward user requests"] 9 | #[doc = " to clusters."] 10 | #[derive(Debug, Clone)] 11 | pub struct GatewayServiceClient { 12 | inner: tonic::client::Grpc, 13 | } 14 | impl GatewayServiceClient 15 | where 16 | T: tonic::client::GrpcService, 17 | T::ResponseBody: Body + Send + 'static, 18 | T::Error: Into, 19 | ::Error: Into + Send, 20 | { 21 | pub fn new(inner: T) -> Self { 22 | let inner = tonic::client::Grpc::new(inner); 23 | Self { inner } 24 | } 25 | pub fn with_interceptor( 26 | inner: T, 27 | interceptor: F, 28 | ) -> GatewayServiceClient> 29 | where 30 | F: tonic::service::Interceptor, 31 | T: tonic::codegen::Service< 32 | http::Request, 33 | Response = http::Response< 34 | >::ResponseBody, 35 | >, 36 | >, 37 | >>::Error: 38 | Into + Send + Sync, 39 | { 40 | GatewayServiceClient::new(InterceptedService::new(inner, interceptor)) 41 | } 42 | #[doc = r" Compress requests with `gzip`."] 43 | #[doc = r""] 44 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 45 | #[doc = r" error."] 46 | pub fn send_gzip(mut self) -> Self { 47 | self.inner = self.inner.send_gzip(); 48 | self 49 | } 50 | #[doc = r" Enable decompressing responses with `gzip`."] 51 | pub fn accept_gzip(mut self) -> Self { 52 | self.inner = self.inner.accept_gzip(); 53 | self 54 | } 55 | #[doc = " GetResource performs an HTTP GET request on the Kubernetes API Server."] 56 | pub async fn get_resource( 57 | &mut self, 58 | request: impl tonic::IntoRequest, 59 | ) -> Result, tonic::Status> 60 | { 61 | self.inner.ready().await.map_err(|e| { 62 | tonic::Status::new( 63 | tonic::Code::Unknown, 64 | format!("Service was not ready: {}", e.into()), 65 | ) 66 | })?; 67 | let codec = tonic::codec::ProstCodec::default(); 68 | let path = http::uri::PathAndQuery::from_static( 69 | "/google.cloud.gkeconnect.gateway.v1beta1.GatewayService/GetResource", 70 | ); 71 | self.inner.unary(request.into_request(), path, codec).await 72 | } 73 | #[doc = " PostResource performs an HTTP POST on the Kubernetes API Server."] 74 | pub async fn post_resource( 75 | &mut self, 76 | request: impl tonic::IntoRequest, 77 | ) -> Result, tonic::Status> 78 | { 79 | self.inner.ready().await.map_err(|e| { 80 | tonic::Status::new( 81 | tonic::Code::Unknown, 82 | format!("Service was not ready: {}", e.into()), 83 | ) 84 | })?; 85 | let codec = tonic::codec::ProstCodec::default(); 86 | let path = http::uri::PathAndQuery::from_static( 87 | "/google.cloud.gkeconnect.gateway.v1beta1.GatewayService/PostResource", 88 | ); 89 | self.inner.unary(request.into_request(), path, codec).await 90 | } 91 | #[doc = " DeleteResource performs an HTTP DELETE on the Kubernetes API Server."] 92 | pub async fn delete_resource( 93 | &mut self, 94 | request: impl tonic::IntoRequest, 95 | ) -> Result, tonic::Status> 96 | { 97 | self.inner.ready().await.map_err(|e| { 98 | tonic::Status::new( 99 | tonic::Code::Unknown, 100 | format!("Service was not ready: {}", e.into()), 101 | ) 102 | })?; 103 | let codec = tonic::codec::ProstCodec::default(); 104 | let path = http::uri::PathAndQuery::from_static( 105 | "/google.cloud.gkeconnect.gateway.v1beta1.GatewayService/DeleteResource", 106 | ); 107 | self.inner.unary(request.into_request(), path, codec).await 108 | } 109 | #[doc = " PutResource performs an HTTP PUT on the Kubernetes API Server."] 110 | pub async fn put_resource( 111 | &mut self, 112 | request: impl tonic::IntoRequest, 113 | ) -> Result, tonic::Status> 114 | { 115 | self.inner.ready().await.map_err(|e| { 116 | tonic::Status::new( 117 | tonic::Code::Unknown, 118 | format!("Service was not ready: {}", e.into()), 119 | ) 120 | })?; 121 | let codec = tonic::codec::ProstCodec::default(); 122 | let path = http::uri::PathAndQuery::from_static( 123 | "/google.cloud.gkeconnect.gateway.v1beta1.GatewayService/PutResource", 124 | ); 125 | self.inner.unary(request.into_request(), path, codec).await 126 | } 127 | #[doc = " PatchResource performs an HTTP PATCH on the Kubernetes API Server."] 128 | pub async fn patch_resource( 129 | &mut self, 130 | request: impl tonic::IntoRequest, 131 | ) -> Result, tonic::Status> 132 | { 133 | self.inner.ready().await.map_err(|e| { 134 | tonic::Status::new( 135 | tonic::Code::Unknown, 136 | format!("Service was not ready: {}", e.into()), 137 | ) 138 | })?; 139 | let codec = tonic::codec::ProstCodec::default(); 140 | let path = http::uri::PathAndQuery::from_static( 141 | "/google.cloud.gkeconnect.gateway.v1beta1.GatewayService/PatchResource", 142 | ); 143 | self.inner.unary(request.into_request(), path, codec).await 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.workflows.r#type.rs: -------------------------------------------------------------------------------- 1 | /// Logged during a workflow execution if the customer has requested call 2 | /// logging. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct EngineCallLog { 5 | /// The execution ID of the execution where the call occurred. 6 | #[prost(string, tag = "1")] 7 | pub execution_id: ::prost::alloc::string::String, 8 | /// The point in time when the activity occurred. 9 | #[prost(message, optional, tag = "2")] 10 | pub activity_time: ::core::option::Option<::prost_types::Timestamp>, 11 | /// The state of the function execution. 12 | #[prost(enumeration = "engine_call_log::State", tag = "3")] 13 | pub state: i32, 14 | /// The name of the step in which the call took place, truncated if necessary. 15 | #[prost(string, tag = "4")] 16 | pub step: ::prost::alloc::string::String, 17 | /// The name of the target of the call, truncated if necessary. 18 | #[prost(string, tag = "5")] 19 | pub callee: ::prost::alloc::string::String, 20 | #[prost(oneof = "engine_call_log::Details", tags = "6, 7, 8")] 21 | pub details: ::core::option::Option, 22 | } 23 | /// Nested message and enum types in `EngineCallLog`. 24 | pub mod engine_call_log { 25 | /// Information about an argument to a called function. 26 | #[derive(Clone, PartialEq, ::prost::Message)] 27 | pub struct CallArg { 28 | /// A function argument, serialized to a string. This may be truncated for 29 | /// size reasons. 30 | #[prost(string, tag = "1")] 31 | pub argument: ::prost::alloc::string::String, 32 | } 33 | /// Information about the start of a call. 34 | #[derive(Clone, PartialEq, ::prost::Message)] 35 | pub struct Begun { 36 | /// The arguments passed to the function. 37 | #[prost(message, repeated, tag = "1")] 38 | pub args: ::prost::alloc::vec::Vec, 39 | } 40 | /// Information about the end of a successful call. 41 | #[derive(Clone, PartialEq, ::prost::Message)] 42 | pub struct Succeeded { 43 | /// The time when the call started. 44 | #[prost(message, optional, tag = "1")] 45 | pub call_start_time: ::core::option::Option<::prost_types::Timestamp>, 46 | /// The result of the call, if the call succeeded, serialized to a string. 47 | /// This may be truncated for size reasons. 48 | #[prost(string, tag = "2")] 49 | pub response: ::prost::alloc::string::String, 50 | } 51 | /// Information about the end of a failed call. 52 | #[derive(Clone, PartialEq, ::prost::Message)] 53 | pub struct ExceptionRaised { 54 | /// The time when the call started. 55 | #[prost(message, optional, tag = "1")] 56 | pub call_start_time: ::core::option::Option<::prost_types::Timestamp>, 57 | /// The exception message which terminated the call, truncated if necessary. 58 | #[prost(string, tag = "2")] 59 | pub exception: ::prost::alloc::string::String, 60 | /// The name of the step where the failure originates, if known. Truncated 61 | /// if necessary. 62 | #[prost(string, tag = "3")] 63 | pub origin: ::prost::alloc::string::String, 64 | } 65 | /// The state of a function call. 66 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 67 | #[repr(i32)] 68 | pub enum State { 69 | /// Function call state is unspecified or unknown. 70 | Unspecified = 0, 71 | /// Function call is starting. 72 | Begun = 1, 73 | /// Function call has completed successfully. 74 | Succeeded = 2, 75 | /// Function call did not succeed because an exception was raised. 76 | ExceptionRaised = 3, 77 | } 78 | #[derive(Clone, PartialEq, ::prost::Oneof)] 79 | pub enum Details { 80 | /// Appears at the start of a call. 81 | #[prost(message, tag = "6")] 82 | Begun(Begun), 83 | /// Appears when a call returns successfully. 84 | #[prost(message, tag = "7")] 85 | Succeeded(Succeeded), 86 | /// Appears when a call returns because an exception was raised. 87 | #[prost(message, tag = "8")] 88 | ExceptionRaised(ExceptionRaised), 89 | } 90 | } 91 | /// Logged during the lifetime of Workflow Execution. 92 | #[derive(Clone, PartialEq, ::prost::Message)] 93 | pub struct ExecutionsSystemLog { 94 | /// Human readable contents of the log in English. The size limit is 5 kB. 95 | #[prost(string, tag = "1")] 96 | pub message: ::prost::alloc::string::String, 97 | /// The absolute point in time when the activity happened. 98 | #[prost(message, optional, tag = "2")] 99 | pub activity_time: ::core::option::Option<::prost_types::Timestamp>, 100 | /// State of the execution when the log was created. 101 | #[prost(enumeration = "executions_system_log::State", tag = "3")] 102 | pub state: i32, 103 | /// Detailed log information. 104 | #[prost(oneof = "executions_system_log::Details", tags = "4, 5, 6")] 105 | pub details: ::core::option::Option, 106 | } 107 | /// Nested message and enum types in `ExecutionsSystemLog`. 108 | pub mod executions_system_log { 109 | /// Detailed information about the start of the execution. 110 | #[derive(Clone, PartialEq, ::prost::Message)] 111 | pub struct Start { 112 | /// The execution input argument. 113 | #[prost(string, tag = "2")] 114 | pub argument: ::prost::alloc::string::String, 115 | } 116 | /// Detailed information about the successful finish of the execution. 117 | #[derive(Clone, PartialEq, ::prost::Message)] 118 | pub struct Success { 119 | /// The final result of the execution. 120 | #[prost(string, tag = "2")] 121 | pub result: ::prost::alloc::string::String, 122 | } 123 | /// Detailed information about the execution failure. 124 | #[derive(Clone, PartialEq, ::prost::Message)] 125 | pub struct Failure { 126 | /// The exception message, e.g. "division by zero". The size limit is 1 kB. 127 | #[prost(string, tag = "1")] 128 | pub exception: ::prost::alloc::string::String, 129 | /// The code location of the statement that has created the log. For example, 130 | /// a log created in subworkflow 'Foo' in step 'bar' will have its source 131 | /// equal to 'Foo.bar'. The size limit is 1 kB. 132 | #[prost(string, tag = "2")] 133 | pub source: ::prost::alloc::string::String, 134 | } 135 | /// Possible states of the execution. There could be more states in the future. 136 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 137 | #[repr(i32)] 138 | pub enum State { 139 | /// Invalid state. 140 | Unspecified = 0, 141 | /// The Workflow Execution is in progress. 142 | Active = 1, 143 | /// The Workflow Execution has finished successfully. 144 | Succeeded = 2, 145 | /// The Workflow Execution failed with an error. 146 | Failed = 3, 147 | /// The Workflow Execution has been stopped intentionally. 148 | Cancelled = 4, 149 | } 150 | /// Detailed log information. 151 | #[derive(Clone, PartialEq, ::prost::Oneof)] 152 | pub enum Details { 153 | /// Appears only in the log created when the execution has started. 154 | #[prost(message, tag = "4")] 155 | Start(Start), 156 | /// Appears only in the log created when the execution has finished 157 | /// successfully. 158 | #[prost(message, tag = "5")] 159 | Success(Success), 160 | /// Appears only in the log created when the execution has failed. 161 | #[prost(message, tag = "6")] 162 | Failure(Failure), 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /googapis/genproto/grafeas.v1beta1.provenance.rs: -------------------------------------------------------------------------------- 1 | /// Provenance of a build. Contains all information needed to verify the full 2 | /// details about the build from source to completion. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct BuildProvenance { 5 | /// Required. Unique identifier of the build. 6 | #[prost(string, tag = "1")] 7 | pub id: ::prost::alloc::string::String, 8 | /// ID of the project. 9 | #[prost(string, tag = "2")] 10 | pub project_id: ::prost::alloc::string::String, 11 | /// Commands requested by the build. 12 | #[prost(message, repeated, tag = "3")] 13 | pub commands: ::prost::alloc::vec::Vec, 14 | /// Output of the build. 15 | #[prost(message, repeated, tag = "4")] 16 | pub built_artifacts: ::prost::alloc::vec::Vec, 17 | /// Time at which the build was created. 18 | #[prost(message, optional, tag = "5")] 19 | pub create_time: ::core::option::Option<::prost_types::Timestamp>, 20 | /// Time at which execution of the build was started. 21 | #[prost(message, optional, tag = "6")] 22 | pub start_time: ::core::option::Option<::prost_types::Timestamp>, 23 | /// Time at which execution of the build was finished. 24 | #[prost(message, optional, tag = "7")] 25 | pub end_time: ::core::option::Option<::prost_types::Timestamp>, 26 | /// E-mail address of the user who initiated this build. Note that this was the 27 | /// user's e-mail address at the time the build was initiated; this address may 28 | /// not represent the same end-user for all time. 29 | #[prost(string, tag = "8")] 30 | pub creator: ::prost::alloc::string::String, 31 | /// URI where any logs for this provenance were written. 32 | #[prost(string, tag = "9")] 33 | pub logs_uri: ::prost::alloc::string::String, 34 | /// Details of the Source input to the build. 35 | #[prost(message, optional, tag = "10")] 36 | pub source_provenance: ::core::option::Option, 37 | /// Trigger identifier if the build was triggered automatically; empty if not. 38 | #[prost(string, tag = "11")] 39 | pub trigger_id: ::prost::alloc::string::String, 40 | /// Special options applied to this build. This is a catch-all field where 41 | /// build providers can enter any desired additional details. 42 | #[prost(map = "string, string", tag = "12")] 43 | pub build_options: 44 | ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, 45 | /// Version string of the builder at the time this build was executed. 46 | #[prost(string, tag = "13")] 47 | pub builder_version: ::prost::alloc::string::String, 48 | } 49 | /// Source describes the location of the source used for the build. 50 | #[derive(Clone, PartialEq, ::prost::Message)] 51 | pub struct Source { 52 | /// If provided, the input binary artifacts for the build came from this 53 | /// location. 54 | #[prost(string, tag = "1")] 55 | pub artifact_storage_source_uri: ::prost::alloc::string::String, 56 | /// Hash(es) of the build source, which can be used to verify that the original 57 | /// source integrity was maintained in the build. 58 | /// 59 | /// The keys to this map are file paths used as build source and the values 60 | /// contain the hash values for those files. 61 | /// 62 | /// If the build source came in a single package such as a gzipped tarfile 63 | /// (.tar.gz), the FileHash will be for the single path to that file. 64 | #[prost(map = "string, message", tag = "2")] 65 | pub file_hashes: ::std::collections::HashMap<::prost::alloc::string::String, FileHashes>, 66 | /// If provided, the source code used for the build came from this location. 67 | #[prost(message, optional, tag = "3")] 68 | pub context: ::core::option::Option, 69 | /// If provided, some of the source code used for the build may be found in 70 | /// these locations, in the case where the source repository had multiple 71 | /// remotes or submodules. This list will not include the context specified in 72 | /// the context field. 73 | #[prost(message, repeated, tag = "4")] 74 | pub additional_contexts: ::prost::alloc::vec::Vec, 75 | } 76 | /// Container message for hashes of byte content of files, used in source 77 | /// messages to verify integrity of source input to the build. 78 | #[derive(Clone, PartialEq, ::prost::Message)] 79 | pub struct FileHashes { 80 | /// Required. Collection of file hashes. 81 | #[prost(message, repeated, tag = "1")] 82 | pub file_hash: ::prost::alloc::vec::Vec, 83 | } 84 | /// Container message for hash values. 85 | #[derive(Clone, PartialEq, ::prost::Message)] 86 | pub struct Hash { 87 | /// Required. The type of hash that was performed. 88 | #[prost(enumeration = "hash::HashType", tag = "1")] 89 | pub r#type: i32, 90 | /// Required. The hash value. 91 | #[prost(bytes = "vec", tag = "2")] 92 | pub value: ::prost::alloc::vec::Vec, 93 | } 94 | /// Nested message and enum types in `Hash`. 95 | pub mod hash { 96 | /// Specifies the hash algorithm. 97 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 98 | #[repr(i32)] 99 | pub enum HashType { 100 | /// Unknown. 101 | Unspecified = 0, 102 | /// A SHA-256 hash. 103 | Sha256 = 1, 104 | } 105 | } 106 | /// Command describes a step performed as part of the build pipeline. 107 | #[derive(Clone, PartialEq, ::prost::Message)] 108 | pub struct Command { 109 | /// Required. Name of the command, as presented on the command line, or if the 110 | /// command is packaged as a Docker container, as presented to `docker pull`. 111 | #[prost(string, tag = "1")] 112 | pub name: ::prost::alloc::string::String, 113 | /// Environment variables set before running this command. 114 | #[prost(string, repeated, tag = "2")] 115 | pub env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 116 | /// Command-line arguments used when executing this command. 117 | #[prost(string, repeated, tag = "3")] 118 | pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 119 | /// Working directory (relative to project source root) used when running this 120 | /// command. 121 | #[prost(string, tag = "4")] 122 | pub dir: ::prost::alloc::string::String, 123 | /// Optional unique identifier for this command, used in wait_for to reference 124 | /// this command as a dependency. 125 | #[prost(string, tag = "5")] 126 | pub id: ::prost::alloc::string::String, 127 | /// The ID(s) of the command(s) that this command depends on. 128 | #[prost(string, repeated, tag = "6")] 129 | pub wait_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 130 | } 131 | /// Artifact describes a build product. 132 | #[derive(Clone, PartialEq, ::prost::Message)] 133 | pub struct Artifact { 134 | /// Hash or checksum value of a binary, or Docker Registry 2.0 digest of a 135 | /// container. 136 | #[prost(string, tag = "1")] 137 | pub checksum: ::prost::alloc::string::String, 138 | /// Artifact ID, if any; for container images, this will be a URL by digest 139 | /// like `gcr.io/projectID/imagename@sha256:123456`. 140 | #[prost(string, tag = "2")] 141 | pub id: ::prost::alloc::string::String, 142 | /// Related artifact names. This may be the path to a binary or jar file, or in 143 | /// the case of a container build, the name used to push the container image to 144 | /// Google Container Registry, as presented to `docker push`. Note that a 145 | /// single Artifact ID can have multiple names, for example if two tags are 146 | /// applied to one image. 147 | #[prost(string, repeated, tag = "3")] 148 | pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, 149 | } 150 | -------------------------------------------------------------------------------- /googapis/genproto/google.maps.roads.v1op.rs: -------------------------------------------------------------------------------- 1 | /// A request to the SnapToRoads method, requesting that a sequence of points be 2 | /// snapped to road segments. 3 | #[derive(Clone, PartialEq, ::prost::Message)] 4 | pub struct SnapToRoadsRequest { 5 | /// The path to be snapped as a series of lat, lng points. Specified as 6 | /// a string of the format: lat,lng|lat,lng|... 7 | #[prost(string, tag = "1")] 8 | pub path: ::prost::alloc::string::String, 9 | /// Whether to interpolate the points to return full road geometry. 10 | #[prost(bool, tag = "2")] 11 | pub interpolate: bool, 12 | /// The asset ID of the asset to which this path relates. This is used for 13 | /// abuse detection purposes for clients with asset-based SKUs. 14 | #[prost(string, tag = "3")] 15 | pub asset_id: ::prost::alloc::string::String, 16 | /// The type of travel being tracked. This will constrain the paths we snap to. 17 | #[prost(enumeration = "TravelMode", tag = "4")] 18 | pub travel_mode: i32, 19 | } 20 | /// A snapped point object, representing the result of snapping. 21 | #[derive(Clone, PartialEq, ::prost::Message)] 22 | pub struct SnappedPoint { 23 | /// The lat,lng of the snapped location. 24 | #[prost(message, optional, tag = "1")] 25 | pub location: ::core::option::Option, 26 | /// The index into the original path of the equivalent pre-snapped point. 27 | /// This allows for identification of points which have been interpolated if 28 | /// this index is missing. 29 | #[prost(message, optional, tag = "2")] 30 | pub original_index: ::core::option::Option, 31 | /// The place ID for this snapped location (road segment). These are the same 32 | /// as are currently used by the Places API. 33 | #[prost(string, tag = "3")] 34 | pub place_id: ::prost::alloc::string::String, 35 | } 36 | /// The response from the SnapToRoads method, returning a sequence of snapped 37 | /// points. 38 | #[derive(Clone, PartialEq, ::prost::Message)] 39 | pub struct SnapToRoadsResponse { 40 | /// A list of snapped points. 41 | #[prost(message, repeated, tag = "1")] 42 | pub snapped_points: ::prost::alloc::vec::Vec, 43 | /// User-visible warning message, if any, which can be shown alongside a valid 44 | /// result. 45 | #[prost(string, tag = "2")] 46 | pub warning_message: ::prost::alloc::string::String, 47 | } 48 | /// A request to the ListNearestRoads method, requesting that a sequence of 49 | /// points be snapped individually to the road segment that each is closest to. 50 | #[derive(Clone, PartialEq, ::prost::Message)] 51 | pub struct ListNearestRoadsRequest { 52 | /// The points to be snapped as a series of lat, lng points. Specified as 53 | /// a string of the format: lat,lng|lat,lng|... 54 | #[prost(string, tag = "1")] 55 | pub points: ::prost::alloc::string::String, 56 | /// The type of travel being tracked. This will constrain the roads we snap to. 57 | #[prost(enumeration = "TravelMode", tag = "2")] 58 | pub travel_mode: i32, 59 | } 60 | /// The response from the ListNearestRoads method, returning a list of snapped 61 | /// points. 62 | #[derive(Clone, PartialEq, ::prost::Message)] 63 | pub struct ListNearestRoadsResponse { 64 | /// A list of snapped points. 65 | #[prost(message, repeated, tag = "1")] 66 | pub snapped_points: ::prost::alloc::vec::Vec, 67 | } 68 | /// An enum representing the mode of travel used for snapping. 69 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] 70 | #[repr(i32)] 71 | pub enum TravelMode { 72 | Unspecified = 0, 73 | Driving = 1, 74 | Cycling = 2, 75 | Walking = 3, 76 | } 77 | #[doc = r" Generated client implementations."] 78 | pub mod roads_service_client { 79 | #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 80 | use tonic::codegen::*; 81 | #[derive(Debug, Clone)] 82 | pub struct RoadsServiceClient { 83 | inner: tonic::client::Grpc, 84 | } 85 | impl RoadsServiceClient 86 | where 87 | T: tonic::client::GrpcService, 88 | T::ResponseBody: Body + Send + 'static, 89 | T::Error: Into, 90 | ::Error: Into + Send, 91 | { 92 | pub fn new(inner: T) -> Self { 93 | let inner = tonic::client::Grpc::new(inner); 94 | Self { inner } 95 | } 96 | pub fn with_interceptor( 97 | inner: T, 98 | interceptor: F, 99 | ) -> RoadsServiceClient> 100 | where 101 | F: tonic::service::Interceptor, 102 | T: tonic::codegen::Service< 103 | http::Request, 104 | Response = http::Response< 105 | >::ResponseBody, 106 | >, 107 | >, 108 | >>::Error: 109 | Into + Send + Sync, 110 | { 111 | RoadsServiceClient::new(InterceptedService::new(inner, interceptor)) 112 | } 113 | #[doc = r" Compress requests with `gzip`."] 114 | #[doc = r""] 115 | #[doc = r" This requires the server to support it otherwise it might respond with an"] 116 | #[doc = r" error."] 117 | pub fn send_gzip(mut self) -> Self { 118 | self.inner = self.inner.send_gzip(); 119 | self 120 | } 121 | #[doc = r" Enable decompressing responses with `gzip`."] 122 | pub fn accept_gzip(mut self) -> Self { 123 | self.inner = self.inner.accept_gzip(); 124 | self 125 | } 126 | #[doc = " This method takes a sequence of latitude,longitude points and snaps them to"] 127 | #[doc = " the most likely road segments. Optionally returns additional points giving"] 128 | #[doc = " the full road geometry. Also returns a place ID for each snapped point."] 129 | pub async fn snap_to_roads( 130 | &mut self, 131 | request: impl tonic::IntoRequest, 132 | ) -> Result, tonic::Status> { 133 | self.inner.ready().await.map_err(|e| { 134 | tonic::Status::new( 135 | tonic::Code::Unknown, 136 | format!("Service was not ready: {}", e.into()), 137 | ) 138 | })?; 139 | let codec = tonic::codec::ProstCodec::default(); 140 | let path = http::uri::PathAndQuery::from_static( 141 | "/google.maps.roads.v1op.RoadsService/SnapToRoads", 142 | ); 143 | self.inner.unary(request.into_request(), path, codec).await 144 | } 145 | #[doc = " This method takes a list of latitude,longitude points and snaps them each"] 146 | #[doc = " to their nearest road. Also returns a place ID for each snapped point."] 147 | pub async fn list_nearest_roads( 148 | &mut self, 149 | request: impl tonic::IntoRequest, 150 | ) -> Result, tonic::Status> { 151 | self.inner.ready().await.map_err(|e| { 152 | tonic::Status::new( 153 | tonic::Code::Unknown, 154 | format!("Service was not ready: {}", e.into()), 155 | ) 156 | })?; 157 | let codec = tonic::codec::ProstCodec::default(); 158 | let path = http::uri::PathAndQuery::from_static( 159 | "/google.maps.roads.v1op.RoadsService/ListNearestRoads", 160 | ); 161 | self.inner.unary(request.into_request(), path, codec).await 162 | } 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /googapis/genproto/google.cloud.aiplatform.v1.schema.predict.instance.rs: -------------------------------------------------------------------------------- 1 | /// Prediction input format for Image Classification. 2 | #[derive(Clone, PartialEq, ::prost::Message)] 3 | pub struct ImageClassificationPredictionInstance { 4 | /// The image bytes or Cloud Storage URI to make the prediction on. 5 | #[prost(string, tag = "1")] 6 | pub content: ::prost::alloc::string::String, 7 | /// The MIME type of the content of the image. Only the images in below listed 8 | /// MIME types are supported. 9 | /// - image/jpeg 10 | /// - image/gif 11 | /// - image/png 12 | /// - image/webp 13 | /// - image/bmp 14 | /// - image/tiff 15 | /// - image/vnd.microsoft.icon 16 | #[prost(string, tag = "2")] 17 | pub mime_type: ::prost::alloc::string::String, 18 | } 19 | /// Prediction input format for Image Object Detection. 20 | #[derive(Clone, PartialEq, ::prost::Message)] 21 | pub struct ImageObjectDetectionPredictionInstance { 22 | /// The image bytes or Cloud Storage URI to make the prediction on. 23 | #[prost(string, tag = "1")] 24 | pub content: ::prost::alloc::string::String, 25 | /// The MIME type of the content of the image. Only the images in below listed 26 | /// MIME types are supported. 27 | /// - image/jpeg 28 | /// - image/gif 29 | /// - image/png 30 | /// - image/webp 31 | /// - image/bmp 32 | /// - image/tiff 33 | /// - image/vnd.microsoft.icon 34 | #[prost(string, tag = "2")] 35 | pub mime_type: ::prost::alloc::string::String, 36 | } 37 | /// Prediction input format for Image Segmentation. 38 | #[derive(Clone, PartialEq, ::prost::Message)] 39 | pub struct ImageSegmentationPredictionInstance { 40 | /// The image bytes to make the predictions on. 41 | #[prost(string, tag = "1")] 42 | pub content: ::prost::alloc::string::String, 43 | /// The MIME type of the content of the image. Only the images in below listed 44 | /// MIME types are supported. 45 | /// - image/jpeg 46 | /// - image/png 47 | #[prost(string, tag = "2")] 48 | pub mime_type: ::prost::alloc::string::String, 49 | } 50 | /// Prediction input format for Text Classification. 51 | #[derive(Clone, PartialEq, ::prost::Message)] 52 | pub struct TextClassificationPredictionInstance { 53 | /// The text snippet to make the predictions on. 54 | #[prost(string, tag = "1")] 55 | pub content: ::prost::alloc::string::String, 56 | /// The MIME type of the text snippet. The supported MIME types are listed 57 | /// below. 58 | /// - text/plain 59 | #[prost(string, tag = "2")] 60 | pub mime_type: ::prost::alloc::string::String, 61 | } 62 | /// Prediction input format for Text Extraction. 63 | #[derive(Clone, PartialEq, ::prost::Message)] 64 | pub struct TextExtractionPredictionInstance { 65 | /// The text snippet to make the predictions on. 66 | #[prost(string, tag = "1")] 67 | pub content: ::prost::alloc::string::String, 68 | /// The MIME type of the text snippet. The supported MIME types are listed 69 | /// below. 70 | /// - text/plain 71 | #[prost(string, tag = "2")] 72 | pub mime_type: ::prost::alloc::string::String, 73 | /// This field is only used for batch prediction. If a key is provided, the 74 | /// batch prediction result will by mapped to this key. If omitted, then the 75 | /// batch prediction result will contain the entire input instance. Vertex AI 76 | /// will not check if keys in the request are duplicates, so it is up to the 77 | /// caller to ensure the keys are unique. 78 | #[prost(string, tag = "3")] 79 | pub key: ::prost::alloc::string::String, 80 | } 81 | /// Prediction input format for Text Sentiment. 82 | #[derive(Clone, PartialEq, ::prost::Message)] 83 | pub struct TextSentimentPredictionInstance { 84 | /// The text snippet to make the predictions on. 85 | #[prost(string, tag = "1")] 86 | pub content: ::prost::alloc::string::String, 87 | /// The MIME type of the text snippet. The supported MIME types are listed 88 | /// below. 89 | /// - text/plain 90 | #[prost(string, tag = "2")] 91 | pub mime_type: ::prost::alloc::string::String, 92 | } 93 | /// Prediction input format for Video Action Recognition. 94 | #[derive(Clone, PartialEq, ::prost::Message)] 95 | pub struct VideoActionRecognitionPredictionInstance { 96 | /// The Google Cloud Storage location of the video on which to perform the 97 | /// prediction. 98 | #[prost(string, tag = "1")] 99 | pub content: ::prost::alloc::string::String, 100 | /// The MIME type of the content of the video. Only the following are 101 | /// supported: video/mp4 video/avi video/quicktime 102 | #[prost(string, tag = "2")] 103 | pub mime_type: ::prost::alloc::string::String, 104 | /// The beginning, inclusive, of the video's time segment on which to perform 105 | /// the prediction. Expressed as a number of seconds as measured from the 106 | /// start of the video, with "s" appended at the end. Fractions are allowed, 107 | /// up to a microsecond precision. 108 | #[prost(string, tag = "3")] 109 | pub time_segment_start: ::prost::alloc::string::String, 110 | /// The end, exclusive, of the video's time segment on which to perform 111 | /// the prediction. Expressed as a number of seconds as measured from the 112 | /// start of the video, with "s" appended at the end. Fractions are allowed, 113 | /// up to a microsecond precision, and "inf" or "Infinity" is allowed, which 114 | /// means the end of the video. 115 | #[prost(string, tag = "4")] 116 | pub time_segment_end: ::prost::alloc::string::String, 117 | } 118 | /// Prediction input format for Video Classification. 119 | #[derive(Clone, PartialEq, ::prost::Message)] 120 | pub struct VideoClassificationPredictionInstance { 121 | /// The Google Cloud Storage location of the video on which to perform the 122 | /// prediction. 123 | #[prost(string, tag = "1")] 124 | pub content: ::prost::alloc::string::String, 125 | /// The MIME type of the content of the video. Only the following are 126 | /// supported: video/mp4 video/avi video/quicktime 127 | #[prost(string, tag = "2")] 128 | pub mime_type: ::prost::alloc::string::String, 129 | /// The beginning, inclusive, of the video's time segment on which to perform 130 | /// the prediction. Expressed as a number of seconds as measured from the 131 | /// start of the video, with "s" appended at the end. Fractions are allowed, 132 | /// up to a microsecond precision. 133 | #[prost(string, tag = "3")] 134 | pub time_segment_start: ::prost::alloc::string::String, 135 | /// The end, exclusive, of the video's time segment on which to perform 136 | /// the prediction. Expressed as a number of seconds as measured from the 137 | /// start of the video, with "s" appended at the end. Fractions are allowed, 138 | /// up to a microsecond precision, and "inf" or "Infinity" is allowed, which 139 | /// means the end of the video. 140 | #[prost(string, tag = "4")] 141 | pub time_segment_end: ::prost::alloc::string::String, 142 | } 143 | /// Prediction input format for Video Object Tracking. 144 | #[derive(Clone, PartialEq, ::prost::Message)] 145 | pub struct VideoObjectTrackingPredictionInstance { 146 | /// The Google Cloud Storage location of the video on which to perform the 147 | /// prediction. 148 | #[prost(string, tag = "1")] 149 | pub content: ::prost::alloc::string::String, 150 | /// The MIME type of the content of the video. Only the following are 151 | /// supported: video/mp4 video/avi video/quicktime 152 | #[prost(string, tag = "2")] 153 | pub mime_type: ::prost::alloc::string::String, 154 | /// The beginning, inclusive, of the video's time segment on which to perform 155 | /// the prediction. Expressed as a number of seconds as measured from the 156 | /// start of the video, with "s" appended at the end. Fractions are allowed, 157 | /// up to a microsecond precision. 158 | #[prost(string, tag = "3")] 159 | pub time_segment_start: ::prost::alloc::string::String, 160 | /// The end, exclusive, of the video's time segment on which to perform 161 | /// the prediction. Expressed as a number of seconds as measured from the 162 | /// start of the video, with "s" appended at the end. Fractions are allowed, 163 | /// up to a microsecond precision, and "inf" or "Infinity" is allowed, which 164 | /// means the end of the video. 165 | #[prost(string, tag = "4")] 166 | pub time_segment_end: ::prost::alloc::string::String, 167 | } 168 | --------------------------------------------------------------------------------