Skip to main content

google_cloud_ces_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 - Gemini Enterprise for Customer Experience 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 Gemini Enterprise for Customer Experience 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//! * [AgentService](client/struct.AgentService.html)
38//! * [SessionService](client/struct.SessionService.html)
39//! * [ToolService](client/struct.ToolService.html)
40//! * [WidgetService](client/struct.WidgetService.html)
41//!
42//! # Features
43//!
44//! - `default-rustls-provider`: enabled by default. Use the default rustls
45//!   crypto provider ([aws-lc-rs]) for TLS and authentication. Applications
46//!   with specific requirements for cryptography (such as exclusively using the
47//!   [ring] crate) should disable this default and call
48//!   `rustls::crypto::CryptoProvider::install_default()`.
49//!
50//! [aws-lc-rs]: https://crates.io/crates/aws-lc-rs
51//! [ring]: https://crates.io/crates/ring
52
53#![allow(deprecated)]
54
55/// The messages and enums that are part of this client library.
56#[allow(clippy::module_inception)]
57pub mod model;
58
59pub use google_cloud_gax::Result;
60pub use google_cloud_gax::error::Error;
61
62#[allow(rustdoc::invalid_html_tags)]
63#[allow(rustdoc::redundant_explicit_links)]
64pub mod stub;
65
66///
67/// # Example
68/// ```
69/// # use google_cloud_ces_v1::client::AgentService;
70/// use google_cloud_gax::paginator::ItemPaginator as _;
71/// async fn sample(
72///    project_id: &str,
73///    location_id: &str,
74///    app_id: &str,
75/// ) -> anyhow::Result<()> {
76///     let client = AgentService::builder().build().await?;
77///     let mut list = client.list_agents()
78///         .set_parent(format!("projects/{project_id}/locations/{location_id}/apps/{app_id}"))
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://ces.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;