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//! * [Intents](client/struct.Intents.html)
51//! * [KnowledgeBases](client/struct.KnowledgeBases.html)
52//! * [Participants](client/struct.Participants.html)
53//! * [Sessions](client/struct.Sessions.html)
54//! * [SessionEntityTypes](client/struct.SessionEntityTypes.html)
55//! * [Versions](client/struct.Versions.html)
56
57#![cfg_attr(docsrs, feature(doc_cfg))]
58#![allow(deprecated)]
59
60/// The messages and enums that are part of this client library.
61#[allow(clippy::module_inception)]
62pub mod model;
63
64pub use gax::Result;
65pub use gax::error::Error;
66
67#[allow(rustdoc::invalid_html_tags)]
68#[allow(rustdoc::redundant_explicit_links)]
69pub mod stub;
70
71/// Concrete implementations of this client library traits.
72pub mod client;
73
74/// Request builders.
75pub mod builder;
76
77#[doc(hidden)]
78pub(crate) mod tracing;
79
80#[doc(hidden)]
81pub(crate) mod transport;
82
83/// The default host used by the service.
84#[cfg(any(
85    feature = "agents",
86    feature = "answer-records",
87    feature = "contexts",
88    feature = "conversations",
89    feature = "conversation-datasets",
90    feature = "conversation-models",
91    feature = "conversation-profiles",
92    feature = "documents",
93    feature = "encryption-spec-service",
94    feature = "entity-types",
95    feature = "environments",
96    feature = "fulfillments",
97    feature = "generators",
98    feature = "intents",
99    feature = "knowledge-bases",
100    feature = "participants",
101    feature = "sessions",
102    feature = "session-entity-types",
103    feature = "versions",
104))]
105const DEFAULT_HOST: &str = "https://dialogflow.googleapis.com/";
106
107#[cfg(any(
108    feature = "agents",
109    feature = "answer-records",
110    feature = "contexts",
111    feature = "conversations",
112    feature = "conversation-datasets",
113    feature = "conversation-models",
114    feature = "conversation-profiles",
115    feature = "documents",
116    feature = "encryption-spec-service",
117    feature = "entity-types",
118    feature = "environments",
119    feature = "fulfillments",
120    feature = "generators",
121    feature = "intents",
122    feature = "knowledge-bases",
123    feature = "participants",
124    feature = "sessions",
125    feature = "session-entity-types",
126    feature = "versions",
127))]
128pub(crate) mod info {
129    const NAME: &str = env!("CARGO_PKG_NAME");
130    const VERSION: &str = env!("CARGO_PKG_VERSION");
131    lazy_static::lazy_static! {
132        pub(crate) static ref X_GOOG_API_CLIENT_HEADER: String = {
133            let ac = gaxi::api_header::XGoogApiClient{
134                name:          NAME,
135                version:       VERSION,
136                library_type:  gaxi::api_header::GAPIC,
137            };
138            ac.rest_header_value()
139        };
140    }
141}