google_cloud_dialogflow_v2/lib.rs
1// Copyright 2025 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 - Dialogflow 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 Dialogflow 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//! * [Agents](client/struct.Agents.html)
38//! * [AnswerRecords](client/struct.AnswerRecords.html)
39//! * [Contexts](client/struct.Contexts.html)
40//! * [Conversations](client/struct.Conversations.html)
41//! * [ConversationDatasets](client/struct.ConversationDatasets.html)
42//! * [ConversationModels](client/struct.ConversationModels.html)
43//! * [ConversationProfiles](client/struct.ConversationProfiles.html)
44//! * [Documents](client/struct.Documents.html)
45//! * [EncryptionSpecService](client/struct.EncryptionSpecService.html)
46//! * [EntityTypes](client/struct.EntityTypes.html)
47//! * [Environments](client/struct.Environments.html)
48//! * [Fulfillments](client/struct.Fulfillments.html)
49//! * [Generators](client/struct.Generators.html)
50//! * [GeneratorEvaluations](client/struct.GeneratorEvaluations.html)
51//! * [Intents](client/struct.Intents.html)
52//! * [KnowledgeBases](client/struct.KnowledgeBases.html)
53//! * [Participants](client/struct.Participants.html)
54//! * [Sessions](client/struct.Sessions.html)
55//! * [SessionEntityTypes](client/struct.SessionEntityTypes.html)
56//! * [SipTrunks](client/struct.SipTrunks.html)
57//! * [Tools](client/struct.Tools.html)
58//! * [Versions](client/struct.Versions.html)
59//!
60//! # Features
61//!
62//! - `default-rustls-provider`: enabled by default. Use the default rustls
63//! crypto provider ([aws-lc-rs]) for TLS and authentication. Applications
64//! with specific requirements for cryptography (such as exclusively using the
65//! [ring] crate) should disable this default and call
66//! `rustls::crypto::CryptoProvider::install_default()`.
67//! - Each client can be enabled using its own feature. Use the client's name
68//! in `kebab-case` to enable the client.
69//!
70//! [aws-lc-rs]: https://crates.io/crates/aws-lc-rs
71//! [ring]: https://crates.io/crates/ring
72
73#![cfg_attr(docsrs, feature(doc_cfg))]
74#![allow(deprecated)]
75
76/// The messages and enums that are part of this client library.
77#[allow(clippy::module_inception)]
78pub mod model;
79
80pub use google_cloud_gax::Result;
81pub use google_cloud_gax::error::Error;
82
83#[allow(rustdoc::invalid_html_tags)]
84#[allow(rustdoc::redundant_explicit_links)]
85pub mod stub;
86
87///
88/// # Example
89/// ```
90/// # use google_cloud_dialogflow_v2::client::AnswerRecords;
91/// use google_cloud_gax::paginator::ItemPaginator as _;
92/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
93/// let client = AnswerRecords::builder().build().await?;
94/// let parent = "parent_value";
95/// let mut list = client.list_answer_records()
96/// .set_parent(parent)
97/// .by_item();
98/// while let Some(item) = list.next().await.transpose()? {
99/// println!("{:?}", item);
100/// }
101/// # Ok(()) }
102/// ```
103/// Concrete implementations of this client library traits.
104pub mod client;
105
106/// Request builders.
107pub mod builder;
108
109#[doc(hidden)]
110pub(crate) mod tracing;
111
112#[doc(hidden)]
113pub(crate) mod transport;
114
115/// The default host used by the service.
116#[cfg(any(
117 feature = "agents",
118 feature = "answer-records",
119 feature = "contexts",
120 feature = "conversations",
121 feature = "conversation-datasets",
122 feature = "conversation-models",
123 feature = "conversation-profiles",
124 feature = "documents",
125 feature = "encryption-spec-service",
126 feature = "entity-types",
127 feature = "environments",
128 feature = "fulfillments",
129 feature = "generators",
130 feature = "generator-evaluations",
131 feature = "intents",
132 feature = "knowledge-bases",
133 feature = "participants",
134 feature = "sessions",
135 feature = "session-entity-types",
136 feature = "sip-trunks",
137 feature = "tools",
138 feature = "versions",
139))]
140const DEFAULT_HOST: &str = "https://dialogflow.googleapis.com/";
141
142#[cfg(any(
143 feature = "agents",
144 feature = "answer-records",
145 feature = "contexts",
146 feature = "conversations",
147 feature = "conversation-datasets",
148 feature = "conversation-models",
149 feature = "conversation-profiles",
150 feature = "documents",
151 feature = "encryption-spec-service",
152 feature = "entity-types",
153 feature = "environments",
154 feature = "fulfillments",
155 feature = "generators",
156 feature = "generator-evaluations",
157 feature = "intents",
158 feature = "knowledge-bases",
159 feature = "participants",
160 feature = "sessions",
161 feature = "session-entity-types",
162 feature = "sip-trunks",
163 feature = "tools",
164 feature = "versions",
165))]
166pub(crate) mod info {
167 const NAME: &str = env!("CARGO_PKG_NAME");
168 const VERSION: &str = env!("CARGO_PKG_VERSION");
169 lazy_static::lazy_static! {
170 pub(crate) static ref X_GOOG_API_CLIENT_HEADER: String = {
171 let ac = gaxi::api_header::XGoogApiClient{
172 name: NAME,
173 version: VERSION,
174 library_type: gaxi::api_header::GAPIC,
175 };
176 ac.rest_header_value()
177 };
178 }
179}
180
181// Define some shortcuts for imported crates.
182pub(crate) use google_cloud_gax::client_builder::ClientBuilder;
183pub(crate) use google_cloud_gax::client_builder::Result as ClientBuilderResult;
184pub(crate) use google_cloud_gax::client_builder::internal::ClientFactory;
185pub(crate) use google_cloud_gax::client_builder::internal::new_builder as new_client_builder;
186pub(crate) use google_cloud_gax::options::RequestOptions;
187pub(crate) use google_cloud_gax::options::internal::RequestBuilder;
188pub(crate) use google_cloud_gax::response::Response;