Skip to main content

google_cloud_visionai_v1/
lib.rs

1// Copyright 2026 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17//! Google Cloud Client Libraries for Rust - Vision AI API
18//!
19//! **WARNING:** some RPCs have no corresponding Rust function to call them.
20//! Typically these are streaming RPCs. We expect adding these RPCs in a
21//! way that does not break the existing APIs or changes their behavior in a
22//! significant way. We do anticipate a number of new crate dependencies
23//! will be required. If you need these RPCs please open an issue in our
24//! GitHub repository.
25//!
26//! This crate contains traits, types, and functions to interact with Vision AI API
27//! Most applications will use the structs defined in the [client] module.
28//!
29//! The client library types and functions are stable and not expected to change.
30//! Please note that Google Cloud services do change from time to time. The client
31//! libraries are designed to preserve backwards compatibility when the service
32//! changes in compatible ways. For example, adding RPCs, or fields to messages
33//! should not introduce breaking changes to the client libraries.
34//!
35//! # Available Clients
36//!
37//! * [HealthCheckService](client/struct.HealthCheckService.html)
38//! * [LiveVideoAnalytics](client/struct.LiveVideoAnalytics.html)
39//! * [AppPlatform](client/struct.AppPlatform.html)
40//! * [StreamingService](client/struct.StreamingService.html)
41//! * [StreamsService](client/struct.StreamsService.html)
42//! * [Warehouse](client/struct.Warehouse.html)
43//!
44//! # Features
45//!
46//! - `default-rustls-provider`: enabled by default. Use the default rustls
47//!   crypto provider ([aws-lc-rs]) for TLS and authentication. Applications
48//!   with specific requirements for cryptography (such as exclusively using the
49//!   [ring] crate) should disable this default and call
50//!   `rustls::crypto::CryptoProvider::install_default()`.
51//!
52//! [aws-lc-rs]: https://crates.io/crates/aws-lc-rs
53//! [ring]: https://crates.io/crates/ring
54
55#![allow(deprecated)]
56
57/// The messages and enums that are part of this client library.
58#[allow(clippy::module_inception)]
59pub mod model;
60
61pub use google_cloud_gax::Result;
62pub use google_cloud_gax::error::Error;
63
64#[allow(rustdoc::invalid_html_tags)]
65#[allow(rustdoc::redundant_explicit_links)]
66pub mod stub;
67
68///
69/// # Example
70/// ```
71/// # use google_cloud_visionai_v1::client::LiveVideoAnalytics;
72/// use google_cloud_gax::paginator::ItemPaginator as _;
73/// async fn sample(
74///    parent: &str,
75/// ) -> anyhow::Result<()> {
76///     let client = LiveVideoAnalytics::builder().build().await?;
77///     let mut list = client.list_public_operators()
78///         .set_parent(parent)
79///         .by_item();
80///     while let Some(item) = list.next().await.transpose()? {
81///         println!("{:?}", item);
82///     }
83///     Ok(())
84/// }
85/// ```
86/// Concrete implementations of this client library traits.
87pub mod client;
88
89/// Request builders.
90pub mod builder;
91
92#[doc(hidden)]
93pub(crate) mod tracing;
94
95#[doc(hidden)]
96pub(crate) mod transport;
97
98/// The default host used by the service.
99const DEFAULT_HOST: &str = "https://visionai.googleapis.com/";
100
101pub(crate) mod info {
102    const NAME: &str = env!("CARGO_PKG_NAME");
103    const VERSION: &str = env!("CARGO_PKG_VERSION");
104    pub(crate) static X_GOOG_API_CLIENT_HEADER: std::sync::LazyLock<String> =
105        std::sync::LazyLock::new(|| {
106            let ac = gaxi::api_header::XGoogApiClient {
107                name: NAME,
108                version: VERSION,
109                library_type: gaxi::api_header::GAPIC,
110            };
111            ac.rest_header_value()
112        });
113}
114
115// Define some shortcuts for imported crates.
116pub(crate) use google_cloud_gax::client_builder::ClientBuilder;
117pub(crate) use google_cloud_gax::client_builder::Result as ClientBuilderResult;
118pub(crate) use google_cloud_gax::client_builder::internal::ClientFactory;
119pub(crate) use google_cloud_gax::client_builder::internal::new_builder as new_client_builder;
120pub(crate) use google_cloud_gax::options::RequestOptions;
121pub(crate) use google_cloud_gax::options::internal::RequestBuilder;
122pub(crate) use google_cloud_gax::response::Response;