Skip to main content

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 gax::Result;
81pub use gax::error::Error;
82
83#[allow(rustdoc::invalid_html_tags)]
84#[allow(rustdoc::redundant_explicit_links)]
85pub mod stub;
86
87/// Concrete implementations of this client library traits.
88pub mod client;
89
90/// Request builders.
91pub mod builder;
92
93#[doc(hidden)]
94pub(crate) mod tracing;
95
96#[doc(hidden)]
97pub(crate) mod transport;
98
99/// The default host used by the service.
100#[cfg(any(
101    feature = "agents",
102    feature = "answer-records",
103    feature = "contexts",
104    feature = "conversations",
105    feature = "conversation-datasets",
106    feature = "conversation-models",
107    feature = "conversation-profiles",
108    feature = "documents",
109    feature = "encryption-spec-service",
110    feature = "entity-types",
111    feature = "environments",
112    feature = "fulfillments",
113    feature = "generators",
114    feature = "generator-evaluations",
115    feature = "intents",
116    feature = "knowledge-bases",
117    feature = "participants",
118    feature = "sessions",
119    feature = "session-entity-types",
120    feature = "sip-trunks",
121    feature = "tools",
122    feature = "versions",
123))]
124const DEFAULT_HOST: &str = "https://dialogflow.googleapis.com/";
125
126#[cfg(any(
127    feature = "agents",
128    feature = "answer-records",
129    feature = "contexts",
130    feature = "conversations",
131    feature = "conversation-datasets",
132    feature = "conversation-models",
133    feature = "conversation-profiles",
134    feature = "documents",
135    feature = "encryption-spec-service",
136    feature = "entity-types",
137    feature = "environments",
138    feature = "fulfillments",
139    feature = "generators",
140    feature = "generator-evaluations",
141    feature = "intents",
142    feature = "knowledge-bases",
143    feature = "participants",
144    feature = "sessions",
145    feature = "session-entity-types",
146    feature = "sip-trunks",
147    feature = "tools",
148    feature = "versions",
149))]
150pub(crate) mod info {
151    const NAME: &str = env!("CARGO_PKG_NAME");
152    const VERSION: &str = env!("CARGO_PKG_VERSION");
153    lazy_static::lazy_static! {
154        pub(crate) static ref X_GOOG_API_CLIENT_HEADER: String = {
155            let ac = gaxi::api_header::XGoogApiClient{
156                name:          NAME,
157                version:       VERSION,
158                library_type:  gaxi::api_header::GAPIC,
159            };
160            ac.rest_header_value()
161        };
162    }
163}