Skip to main content

google_cloud_aiplatform_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 - Vertex AI 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 Vertex AI 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//! * [DataFoundryService](client/struct.DataFoundryService.html)
38//! * [DatasetService](client/struct.DatasetService.html)
39//! * [DeploymentResourcePoolService](client/struct.DeploymentResourcePoolService.html)
40//! * [EndpointService](client/struct.EndpointService.html)
41//! * [EvaluationService](client/struct.EvaluationService.html)
42//! * [FeatureOnlineStoreAdminService](client/struct.FeatureOnlineStoreAdminService.html)
43//! * [FeatureOnlineStoreService](client/struct.FeatureOnlineStoreService.html)
44//! * [FeatureRegistryService](client/struct.FeatureRegistryService.html)
45//! * [FeaturestoreOnlineServingService](client/struct.FeaturestoreOnlineServingService.html)
46//! * [FeaturestoreService](client/struct.FeaturestoreService.html)
47//! * [GenAiCacheService](client/struct.GenAiCacheService.html)
48//! * [GenAiTuningService](client/struct.GenAiTuningService.html)
49//! * [IndexEndpointService](client/struct.IndexEndpointService.html)
50//! * [IndexService](client/struct.IndexService.html)
51//! * [JobService](client/struct.JobService.html)
52//! * [LlmUtilityService](client/struct.LlmUtilityService.html)
53//! * [MatchService](client/struct.MatchService.html)
54//! * [MetadataService](client/struct.MetadataService.html)
55//! * [MigrationService](client/struct.MigrationService.html)
56//! * [ModelGardenService](client/struct.ModelGardenService.html)
57//! * [ModelService](client/struct.ModelService.html)
58//! * [NotebookService](client/struct.NotebookService.html)
59//! * [PersistentResourceService](client/struct.PersistentResourceService.html)
60//! * [PipelineService](client/struct.PipelineService.html)
61//! * [PredictionService](client/struct.PredictionService.html)
62//! * [ReasoningEngineExecutionService](client/struct.ReasoningEngineExecutionService.html)
63//! * [ReasoningEngineService](client/struct.ReasoningEngineService.html)
64//! * [ScheduleService](client/struct.ScheduleService.html)
65//! * [SpecialistPoolService](client/struct.SpecialistPoolService.html)
66//! * [TensorboardService](client/struct.TensorboardService.html)
67//! * [VertexRagDataService](client/struct.VertexRagDataService.html)
68//! * [VertexRagService](client/struct.VertexRagService.html)
69//! * [VizierService](client/struct.VizierService.html)
70//!
71//! # Features
72//!
73//! - `default-rustls-provider`: enabled by default. Use the default rustls
74//!   crypto provider ([aws-lc-rs]) for TLS and authentication. Applications
75//!   with specific requirements for cryptography (such as exclusively using the
76//!   [ring] crate) should disable this default and call
77//!   `rustls::crypto::CryptoProvider::install_default()`.
78//! - Each client can be enabled using its own feature. Use the client's name
79//!   in `kebab-case` to enable the client.
80//!
81//! [aws-lc-rs]: https://crates.io/crates/aws-lc-rs
82//! [ring]: https://crates.io/crates/ring
83
84#![cfg_attr(docsrs, feature(doc_cfg))]
85#![allow(deprecated)]
86
87/// The messages and enums that are part of this client library.
88#[allow(clippy::module_inception)]
89pub mod model;
90
91pub use google_cloud_gax::Result;
92pub use google_cloud_gax::error::Error;
93
94#[allow(rustdoc::invalid_html_tags)]
95#[allow(rustdoc::redundant_explicit_links)]
96pub mod stub;
97
98/// Concrete implementations of this client library traits.
99pub mod client;
100
101/// Request builders.
102pub mod builder;
103
104#[doc(hidden)]
105pub(crate) mod tracing;
106
107#[doc(hidden)]
108pub(crate) mod transport;
109
110/// The default host used by the service.
111#[cfg(any(
112    feature = "data-foundry-service",
113    feature = "dataset-service",
114    feature = "deployment-resource-pool-service",
115    feature = "endpoint-service",
116    feature = "evaluation-service",
117    feature = "feature-online-store-admin-service",
118    feature = "feature-online-store-service",
119    feature = "feature-registry-service",
120    feature = "featurestore-online-serving-service",
121    feature = "featurestore-service",
122    feature = "gen-ai-cache-service",
123    feature = "gen-ai-tuning-service",
124    feature = "index-endpoint-service",
125    feature = "index-service",
126    feature = "job-service",
127    feature = "llm-utility-service",
128    feature = "match-service",
129    feature = "metadata-service",
130    feature = "migration-service",
131    feature = "model-garden-service",
132    feature = "model-service",
133    feature = "notebook-service",
134    feature = "persistent-resource-service",
135    feature = "pipeline-service",
136    feature = "prediction-service",
137    feature = "reasoning-engine-execution-service",
138    feature = "reasoning-engine-service",
139    feature = "schedule-service",
140    feature = "specialist-pool-service",
141    feature = "tensorboard-service",
142    feature = "vertex-rag-data-service",
143    feature = "vertex-rag-service",
144    feature = "vizier-service",
145))]
146const DEFAULT_HOST: &str = "https://aiplatform.googleapis.com/";
147
148#[cfg(any(
149    feature = "data-foundry-service",
150    feature = "dataset-service",
151    feature = "deployment-resource-pool-service",
152    feature = "endpoint-service",
153    feature = "evaluation-service",
154    feature = "feature-online-store-admin-service",
155    feature = "feature-online-store-service",
156    feature = "feature-registry-service",
157    feature = "featurestore-online-serving-service",
158    feature = "featurestore-service",
159    feature = "gen-ai-cache-service",
160    feature = "gen-ai-tuning-service",
161    feature = "index-endpoint-service",
162    feature = "index-service",
163    feature = "job-service",
164    feature = "llm-utility-service",
165    feature = "match-service",
166    feature = "metadata-service",
167    feature = "migration-service",
168    feature = "model-garden-service",
169    feature = "model-service",
170    feature = "notebook-service",
171    feature = "persistent-resource-service",
172    feature = "pipeline-service",
173    feature = "prediction-service",
174    feature = "reasoning-engine-execution-service",
175    feature = "reasoning-engine-service",
176    feature = "schedule-service",
177    feature = "specialist-pool-service",
178    feature = "tensorboard-service",
179    feature = "vertex-rag-data-service",
180    feature = "vertex-rag-service",
181    feature = "vizier-service",
182))]
183pub(crate) mod info {
184    const NAME: &str = env!("CARGO_PKG_NAME");
185    const VERSION: &str = env!("CARGO_PKG_VERSION");
186    lazy_static::lazy_static! {
187        pub(crate) static ref X_GOOG_API_CLIENT_HEADER: String = {
188            let ac = gaxi::api_header::XGoogApiClient{
189                name:          NAME,
190                version:       VERSION,
191                library_type:  gaxi::api_header::GAPIC,
192            };
193            ac.rest_header_value()
194        };
195    }
196}
197
198// Define some shortcuts for imported crates.
199pub(crate) use google_cloud_gax::client_builder::ClientBuilder;
200pub(crate) use google_cloud_gax::client_builder::Result as ClientBuilderResult;
201pub(crate) use google_cloud_gax::client_builder::internal::ClientFactory;
202pub(crate) use google_cloud_gax::client_builder::internal::new_builder as new_client_builder;
203pub(crate) use google_cloud_gax::options::RequestOptions;
204pub(crate) use google_cloud_gax::options::internal::RequestBuilder;
205pub(crate) use google_cloud_gax::response::Response;