google_cloud_discoveryengine_v1/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 - Discovery Engine 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 Discovery Engine 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//! * [AssistantService](client/struct.AssistantService.html)
38//! * [CmekConfigService](client/struct.CmekConfigService.html)
39//! * [CompletionService](client/struct.CompletionService.html)
40//! * [ControlService](client/struct.ControlService.html)
41//! * [ConversationalSearchService](client/struct.ConversationalSearchService.html)
42//! * [DataStoreService](client/struct.DataStoreService.html)
43//! * [DocumentService](client/struct.DocumentService.html)
44//! * [EngineService](client/struct.EngineService.html)
45//! * [GroundedGenerationService](client/struct.GroundedGenerationService.html)
46//! * [IdentityMappingStoreService](client/struct.IdentityMappingStoreService.html)
47//! * [ProjectService](client/struct.ProjectService.html)
48//! * [RankService](client/struct.RankService.html)
49//! * [RecommendationService](client/struct.RecommendationService.html)
50//! * [SchemaService](client/struct.SchemaService.html)
51//! * [SearchService](client/struct.SearchService.html)
52//! * [SearchTuningService](client/struct.SearchTuningService.html)
53//! * [ServingConfigService](client/struct.ServingConfigService.html)
54//! * [SessionService](client/struct.SessionService.html)
55//! * [SiteSearchEngineService](client/struct.SiteSearchEngineService.html)
56//! * [UserEventService](client/struct.UserEventService.html)
57//! * [UserLicenseService](client/struct.UserLicenseService.html)
58
59#![cfg_attr(docsrs, feature(doc_cfg))]
60#![allow(deprecated)]
61
62/// The messages and enums that are part of this client library.
63#[allow(clippy::module_inception)]
64pub mod model;
65
66pub use gax::Result;
67pub use gax::error::Error;
68
69#[allow(rustdoc::invalid_html_tags)]
70#[allow(rustdoc::redundant_explicit_links)]
71pub mod stub;
72
73/// Concrete implementations of this client library traits.
74pub mod client;
75
76/// Request builders.
77pub mod builder;
78
79#[doc(hidden)]
80pub(crate) mod tracing;
81
82#[doc(hidden)]
83pub(crate) mod transport;
84
85/// The default host used by the service.
86#[cfg(any(
87 feature = "assistant-service",
88 feature = "cmek-config-service",
89 feature = "completion-service",
90 feature = "control-service",
91 feature = "conversational-search-service",
92 feature = "data-store-service",
93 feature = "document-service",
94 feature = "engine-service",
95 feature = "grounded-generation-service",
96 feature = "identity-mapping-store-service",
97 feature = "project-service",
98 feature = "rank-service",
99 feature = "recommendation-service",
100 feature = "schema-service",
101 feature = "search-service",
102 feature = "search-tuning-service",
103 feature = "serving-config-service",
104 feature = "session-service",
105 feature = "site-search-engine-service",
106 feature = "user-event-service",
107 feature = "user-license-service",
108))]
109const DEFAULT_HOST: &str = "https://discoveryengine.googleapis.com/";
110
111#[cfg(any(
112 feature = "assistant-service",
113 feature = "cmek-config-service",
114 feature = "completion-service",
115 feature = "control-service",
116 feature = "conversational-search-service",
117 feature = "data-store-service",
118 feature = "document-service",
119 feature = "engine-service",
120 feature = "grounded-generation-service",
121 feature = "identity-mapping-store-service",
122 feature = "project-service",
123 feature = "rank-service",
124 feature = "recommendation-service",
125 feature = "schema-service",
126 feature = "search-service",
127 feature = "search-tuning-service",
128 feature = "serving-config-service",
129 feature = "session-service",
130 feature = "site-search-engine-service",
131 feature = "user-event-service",
132 feature = "user-license-service",
133))]
134pub(crate) mod info {
135 const NAME: &str = env!("CARGO_PKG_NAME");
136 const VERSION: &str = env!("CARGO_PKG_VERSION");
137 lazy_static::lazy_static! {
138 pub(crate) static ref X_GOOG_API_CLIENT_HEADER: String = {
139 let ac = gaxi::api_header::XGoogApiClient{
140 name: NAME,
141 version: VERSION,
142 library_type: gaxi::api_header::GAPIC,
143 };
144 ac.rest_header_value()
145 };
146 }
147}