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//! **FEEDBACK WANTED:** We believe the APIs in this crate are stable, and
20//! do not anticipate any breaking changes are needed. We are looking for
21//! feedback before labeling the APIs "1.0". Changes (even breaking changes)
22//! are still possible, but not expected.
23//!
24//! We also believe the implementation is ready for production, bugs are
25//! still possible, but not expected.
26//!
27//!
28//! **WARNING:** some RPCs have no corresponding Rust function to call them.
29//! Typically these are streaming RPCs. We expect adding these RPCs in a
30//! way that does not break the existing APIs or changes their behavior in a
31//! significant way. We do anticipate a number of new crate dependencies
32//! will be required. If you need these RPCs please open an issue in our
33//! GitHub repository.
34//!
35//!
36//! This crate contains traits, types, and functions to interact with Discovery Engine API
37//! Most applications will use the structs defined in the [client] module.
38//! More specifically:
39//!
40//! * [AssistantService](client/struct.AssistantService.html)
41//! * [CmekConfigService](client/struct.CmekConfigService.html)
42//! * [CompletionService](client/struct.CompletionService.html)
43//! * [ControlService](client/struct.ControlService.html)
44//! * [ConversationalSearchService](client/struct.ConversationalSearchService.html)
45//! * [DataStoreService](client/struct.DataStoreService.html)
46//! * [DocumentService](client/struct.DocumentService.html)
47//! * [EngineService](client/struct.EngineService.html)
48//! * [GroundedGenerationService](client/struct.GroundedGenerationService.html)
49//! * [IdentityMappingStoreService](client/struct.IdentityMappingStoreService.html)
50//! * [ProjectService](client/struct.ProjectService.html)
51//! * [RankService](client/struct.RankService.html)
52//! * [RecommendationService](client/struct.RecommendationService.html)
53//! * [SchemaService](client/struct.SchemaService.html)
54//! * [SearchService](client/struct.SearchService.html)
55//! * [SearchTuningService](client/struct.SearchTuningService.html)
56//! * [ServingConfigService](client/struct.ServingConfigService.html)
57//! * [SessionService](client/struct.SessionService.html)
58//! * [SiteSearchEngineService](client/struct.SiteSearchEngineService.html)
59//! * [UserEventService](client/struct.UserEventService.html)
60//! * [UserLicenseService](client/struct.UserLicenseService.html)
61
62#![cfg_attr(docsrs, feature(doc_cfg))]
63#![allow(deprecated)]
64
65/// The messages and enums that are part of this client library.
66#[allow(clippy::module_inception)]
67pub mod model;
68
69pub use gax::Result;
70pub use gax::error::Error;
71
72#[allow(rustdoc::invalid_html_tags)]
73#[allow(rustdoc::redundant_explicit_links)]
74pub mod stub;
75
76/// Concrete implementations of this client library traits.
77pub mod client;
78
79/// Request builders.
80pub mod builder;
81
82#[doc(hidden)]
83pub(crate) mod tracing;
84
85#[doc(hidden)]
86pub(crate) mod transport;
87
88/// The default host used by the service.
89#[cfg(any(
90 feature = "assistant-service",
91 feature = "cmek-config-service",
92 feature = "completion-service",
93 feature = "control-service",
94 feature = "conversational-search-service",
95 feature = "data-store-service",
96 feature = "document-service",
97 feature = "engine-service",
98 feature = "grounded-generation-service",
99 feature = "identity-mapping-store-service",
100 feature = "project-service",
101 feature = "rank-service",
102 feature = "recommendation-service",
103 feature = "schema-service",
104 feature = "search-service",
105 feature = "search-tuning-service",
106 feature = "serving-config-service",
107 feature = "session-service",
108 feature = "site-search-engine-service",
109 feature = "user-event-service",
110 feature = "user-license-service",
111))]
112const DEFAULT_HOST: &str = "https://discoveryengine.googleapis.com/";
113
114#[cfg(any(
115 feature = "assistant-service",
116 feature = "cmek-config-service",
117 feature = "completion-service",
118 feature = "control-service",
119 feature = "conversational-search-service",
120 feature = "data-store-service",
121 feature = "document-service",
122 feature = "engine-service",
123 feature = "grounded-generation-service",
124 feature = "identity-mapping-store-service",
125 feature = "project-service",
126 feature = "rank-service",
127 feature = "recommendation-service",
128 feature = "schema-service",
129 feature = "search-service",
130 feature = "search-tuning-service",
131 feature = "serving-config-service",
132 feature = "session-service",
133 feature = "site-search-engine-service",
134 feature = "user-event-service",
135 feature = "user-license-service",
136))]
137pub(crate) mod info {
138 const NAME: &str = env!("CARGO_PKG_NAME");
139 const VERSION: &str = env!("CARGO_PKG_VERSION");
140 lazy_static::lazy_static! {
141 pub(crate) static ref X_GOOG_API_CLIENT_HEADER: String = {
142 let ac = gaxi::api_header::XGoogApiClient{
143 name: NAME,
144 version: VERSION,
145 library_type: gaxi::api_header::GAPIC,
146 };
147 ac.rest_header_value()
148 };
149 }
150}