google_cloud_compute_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 - Google Compute Engine API
18//!
19//! This client library was generated from the "20251230" revision of the API.
20//!
21//! This crate contains traits, types, and functions to interact with Google Compute Engine API
22//! Most applications will use the structs defined in the [client] module.
23//!
24//! The client library types and functions are stable and not expected to change.
25//! Please note that Google Cloud services do change from time to time. The client
26//! libraries are designed to preserve backwards compatibility when the service
27//! changes in compatible ways. For example, adding RPCs, or fields to messages
28//! should not introduce breaking changes to the client libraries.
29//!
30//! # Available Clients
31//!
32//! * [AcceleratorTypes](client/struct.AcceleratorTypes.html)
33//! * [Addresses](client/struct.Addresses.html)
34//! * [Advice](client/struct.Advice.html)
35//! * [Autoscalers](client/struct.Autoscalers.html)
36//! * [BackendBuckets](client/struct.BackendBuckets.html)
37//! * [BackendServices](client/struct.BackendServices.html)
38//! * [CrossSiteNetworks](client/struct.CrossSiteNetworks.html)
39//! * [DiskTypes](client/struct.DiskTypes.html)
40//! * [Disks](client/struct.Disks.html)
41//! * [ExternalVpnGateways](client/struct.ExternalVpnGateways.html)
42//! * [FirewallPolicies](client/struct.FirewallPolicies.html)
43//! * [Firewalls](client/struct.Firewalls.html)
44//! * [ForwardingRules](client/struct.ForwardingRules.html)
45//! * [FutureReservations](client/struct.FutureReservations.html)
46//! * [GlobalAddresses](client/struct.GlobalAddresses.html)
47//! * [GlobalForwardingRules](client/struct.GlobalForwardingRules.html)
48//! * [GlobalNetworkEndpointGroups](client/struct.GlobalNetworkEndpointGroups.html)
49//! * [GlobalOperations](client/struct.GlobalOperations.html)
50//! * [GlobalOrganizationOperations](client/struct.GlobalOrganizationOperations.html)
51//! * [GlobalPublicDelegatedPrefixes](client/struct.GlobalPublicDelegatedPrefixes.html)
52//! * [HealthChecks](client/struct.HealthChecks.html)
53//! * [HttpHealthChecks](client/struct.HttpHealthChecks.html)
54//! * [HttpsHealthChecks](client/struct.HttpsHealthChecks.html)
55//! * [ImageFamilyViews](client/struct.ImageFamilyViews.html)
56//! * [Images](client/struct.Images.html)
57//! * [InstanceGroupManagerResizeRequests](client/struct.InstanceGroupManagerResizeRequests.html)
58//! * [InstanceGroupManagers](client/struct.InstanceGroupManagers.html)
59//! * [InstanceGroups](client/struct.InstanceGroups.html)
60//! * [InstanceSettings](client/struct.InstanceSettings.html)
61//! * [InstanceTemplates](client/struct.InstanceTemplates.html)
62//! * [Instances](client/struct.Instances.html)
63//! * [InstantSnapshots](client/struct.InstantSnapshots.html)
64//! * [InterconnectAttachmentGroups](client/struct.InterconnectAttachmentGroups.html)
65//! * [InterconnectAttachments](client/struct.InterconnectAttachments.html)
66//! * [InterconnectGroups](client/struct.InterconnectGroups.html)
67//! * [InterconnectLocations](client/struct.InterconnectLocations.html)
68//! * [InterconnectRemoteLocations](client/struct.InterconnectRemoteLocations.html)
69//! * [Interconnects](client/struct.Interconnects.html)
70//! * [LicenseCodes](client/struct.LicenseCodes.html)
71//! * [Licenses](client/struct.Licenses.html)
72//! * [MachineImages](client/struct.MachineImages.html)
73//! * [MachineTypes](client/struct.MachineTypes.html)
74//! * [NetworkAttachments](client/struct.NetworkAttachments.html)
75//! * [NetworkEdgeSecurityServices](client/struct.NetworkEdgeSecurityServices.html)
76//! * [NetworkEndpointGroups](client/struct.NetworkEndpointGroups.html)
77//! * [NetworkFirewallPolicies](client/struct.NetworkFirewallPolicies.html)
78//! * [NetworkProfiles](client/struct.NetworkProfiles.html)
79//! * [Networks](client/struct.Networks.html)
80//! * [NodeGroups](client/struct.NodeGroups.html)
81//! * [NodeTemplates](client/struct.NodeTemplates.html)
82//! * [NodeTypes](client/struct.NodeTypes.html)
83//! * [OrganizationSecurityPolicies](client/struct.OrganizationSecurityPolicies.html)
84//! * [PacketMirrorings](client/struct.PacketMirrorings.html)
85//! * [PreviewFeatures](client/struct.PreviewFeatures.html)
86//! * [Projects](client/struct.Projects.html)
87//! * [PublicAdvertisedPrefixes](client/struct.PublicAdvertisedPrefixes.html)
88//! * [PublicDelegatedPrefixes](client/struct.PublicDelegatedPrefixes.html)
89//! * [RegionAutoscalers](client/struct.RegionAutoscalers.html)
90//! * [RegionBackendServices](client/struct.RegionBackendServices.html)
91//! * [RegionCommitments](client/struct.RegionCommitments.html)
92//! * [RegionDiskTypes](client/struct.RegionDiskTypes.html)
93//! * [RegionDisks](client/struct.RegionDisks.html)
94//! * [RegionHealthCheckServices](client/struct.RegionHealthCheckServices.html)
95//! * [RegionHealthChecks](client/struct.RegionHealthChecks.html)
96//! * [RegionInstanceGroupManagers](client/struct.RegionInstanceGroupManagers.html)
97//! * [RegionInstanceGroups](client/struct.RegionInstanceGroups.html)
98//! * [RegionInstanceTemplates](client/struct.RegionInstanceTemplates.html)
99//! * [RegionInstances](client/struct.RegionInstances.html)
100//! * [RegionInstantSnapshots](client/struct.RegionInstantSnapshots.html)
101//! * [RegionNetworkEndpointGroups](client/struct.RegionNetworkEndpointGroups.html)
102//! * [RegionNetworkFirewallPolicies](client/struct.RegionNetworkFirewallPolicies.html)
103//! * [RegionNotificationEndpoints](client/struct.RegionNotificationEndpoints.html)
104//! * [RegionOperations](client/struct.RegionOperations.html)
105//! * [RegionSecurityPolicies](client/struct.RegionSecurityPolicies.html)
106//! * [RegionSslCertificates](client/struct.RegionSslCertificates.html)
107//! * [RegionSslPolicies](client/struct.RegionSslPolicies.html)
108//! * [RegionTargetHttpProxies](client/struct.RegionTargetHttpProxies.html)
109//! * [RegionTargetHttpsProxies](client/struct.RegionTargetHttpsProxies.html)
110//! * [RegionTargetTcpProxies](client/struct.RegionTargetTcpProxies.html)
111//! * [RegionUrlMaps](client/struct.RegionUrlMaps.html)
112//! * [RegionZones](client/struct.RegionZones.html)
113//! * [Regions](client/struct.Regions.html)
114//! * [ReservationBlocks](client/struct.ReservationBlocks.html)
115//! * [ReservationSubBlocks](client/struct.ReservationSubBlocks.html)
116//! * [Reservations](client/struct.Reservations.html)
117//! * [ResourcePolicies](client/struct.ResourcePolicies.html)
118//! * [Routers](client/struct.Routers.html)
119//! * [Routes](client/struct.Routes.html)
120//! * [SecurityPolicies](client/struct.SecurityPolicies.html)
121//! * [ServiceAttachments](client/struct.ServiceAttachments.html)
122//! * [SnapshotSettings](client/struct.SnapshotSettings.html)
123//! * [Snapshots](client/struct.Snapshots.html)
124//! * [SslCertificates](client/struct.SslCertificates.html)
125//! * [SslPolicies](client/struct.SslPolicies.html)
126//! * [StoragePoolTypes](client/struct.StoragePoolTypes.html)
127//! * [StoragePools](client/struct.StoragePools.html)
128//! * [Subnetworks](client/struct.Subnetworks.html)
129//! * [TargetGrpcProxies](client/struct.TargetGrpcProxies.html)
130//! * [TargetHttpProxies](client/struct.TargetHttpProxies.html)
131//! * [TargetHttpsProxies](client/struct.TargetHttpsProxies.html)
132//! * [TargetInstances](client/struct.TargetInstances.html)
133//! * [TargetPools](client/struct.TargetPools.html)
134//! * [TargetSslProxies](client/struct.TargetSslProxies.html)
135//! * [TargetTcpProxies](client/struct.TargetTcpProxies.html)
136//! * [TargetVpnGateways](client/struct.TargetVpnGateways.html)
137//! * [UrlMaps](client/struct.UrlMaps.html)
138//! * [VpnGateways](client/struct.VpnGateways.html)
139//! * [VpnTunnels](client/struct.VpnTunnels.html)
140//! * [WireGroups](client/struct.WireGroups.html)
141//! * [ZoneOperations](client/struct.ZoneOperations.html)
142//! * [Zones](client/struct.Zones.html)
143
144#![cfg_attr(docsrs, feature(doc_cfg))]
145#![allow(deprecated)]
146
147/// The messages and enums that are part of this client library.
148#[allow(clippy::module_inception)]
149pub mod model;
150
151pub use gax::Result;
152pub use gax::error::Error;
153
154#[allow(rustdoc::invalid_html_tags)]
155#[allow(rustdoc::redundant_explicit_links)]
156pub mod stub;
157
158/// Concrete implementations of this client library traits.
159pub mod client;
160
161/// Request builders.
162pub mod builder;
163
164#[doc(hidden)]
165pub(crate) mod tracing;
166
167#[doc(hidden)]
168pub(crate) mod transport;
169
170/// The default host used by the service.
171#[cfg(any(
172 feature = "accelerator-types",
173 feature = "addresses",
174 feature = "advice",
175 feature = "autoscalers",
176 feature = "backend-buckets",
177 feature = "backend-services",
178 feature = "cross-site-networks",
179 feature = "disk-types",
180 feature = "disks",
181 feature = "external-vpn-gateways",
182 feature = "firewall-policies",
183 feature = "firewalls",
184 feature = "forwarding-rules",
185 feature = "future-reservations",
186 feature = "global-addresses",
187 feature = "global-forwarding-rules",
188 feature = "global-network-endpoint-groups",
189 feature = "global-operations",
190 feature = "global-organization-operations",
191 feature = "global-public-delegated-prefixes",
192 feature = "health-checks",
193 feature = "http-health-checks",
194 feature = "https-health-checks",
195 feature = "image-family-views",
196 feature = "images",
197 feature = "instance-group-manager-resize-requests",
198 feature = "instance-group-managers",
199 feature = "instance-groups",
200 feature = "instance-settings",
201 feature = "instance-templates",
202 feature = "instances",
203 feature = "instant-snapshots",
204 feature = "interconnect-attachment-groups",
205 feature = "interconnect-attachments",
206 feature = "interconnect-groups",
207 feature = "interconnect-locations",
208 feature = "interconnect-remote-locations",
209 feature = "interconnects",
210 feature = "license-codes",
211 feature = "licenses",
212 feature = "machine-images",
213 feature = "machine-types",
214 feature = "network-attachments",
215 feature = "network-edge-security-services",
216 feature = "network-endpoint-groups",
217 feature = "network-firewall-policies",
218 feature = "network-profiles",
219 feature = "networks",
220 feature = "node-groups",
221 feature = "node-templates",
222 feature = "node-types",
223 feature = "organization-security-policies",
224 feature = "packet-mirrorings",
225 feature = "preview-features",
226 feature = "projects",
227 feature = "public-advertised-prefixes",
228 feature = "public-delegated-prefixes",
229 feature = "region-autoscalers",
230 feature = "region-backend-services",
231 feature = "region-commitments",
232 feature = "region-disk-types",
233 feature = "region-disks",
234 feature = "region-health-check-services",
235 feature = "region-health-checks",
236 feature = "region-instance-group-managers",
237 feature = "region-instance-groups",
238 feature = "region-instance-templates",
239 feature = "region-instances",
240 feature = "region-instant-snapshots",
241 feature = "region-network-endpoint-groups",
242 feature = "region-network-firewall-policies",
243 feature = "region-notification-endpoints",
244 feature = "region-operations",
245 feature = "region-security-policies",
246 feature = "region-ssl-certificates",
247 feature = "region-ssl-policies",
248 feature = "region-target-http-proxies",
249 feature = "region-target-https-proxies",
250 feature = "region-target-tcp-proxies",
251 feature = "region-url-maps",
252 feature = "region-zones",
253 feature = "regions",
254 feature = "reservation-blocks",
255 feature = "reservation-sub-blocks",
256 feature = "reservations",
257 feature = "resource-policies",
258 feature = "routers",
259 feature = "routes",
260 feature = "security-policies",
261 feature = "service-attachments",
262 feature = "snapshot-settings",
263 feature = "snapshots",
264 feature = "ssl-certificates",
265 feature = "ssl-policies",
266 feature = "storage-pool-types",
267 feature = "storage-pools",
268 feature = "subnetworks",
269 feature = "target-grpc-proxies",
270 feature = "target-http-proxies",
271 feature = "target-https-proxies",
272 feature = "target-instances",
273 feature = "target-pools",
274 feature = "target-ssl-proxies",
275 feature = "target-tcp-proxies",
276 feature = "target-vpn-gateways",
277 feature = "url-maps",
278 feature = "vpn-gateways",
279 feature = "vpn-tunnels",
280 feature = "wire-groups",
281 feature = "zone-operations",
282 feature = "zones",
283))]
284const DEFAULT_HOST: &str = "https://compute.googleapis.com/";
285
286#[cfg(any(
287 feature = "accelerator-types",
288 feature = "addresses",
289 feature = "advice",
290 feature = "autoscalers",
291 feature = "backend-buckets",
292 feature = "backend-services",
293 feature = "cross-site-networks",
294 feature = "disk-types",
295 feature = "disks",
296 feature = "external-vpn-gateways",
297 feature = "firewall-policies",
298 feature = "firewalls",
299 feature = "forwarding-rules",
300 feature = "future-reservations",
301 feature = "global-addresses",
302 feature = "global-forwarding-rules",
303 feature = "global-network-endpoint-groups",
304 feature = "global-operations",
305 feature = "global-organization-operations",
306 feature = "global-public-delegated-prefixes",
307 feature = "health-checks",
308 feature = "http-health-checks",
309 feature = "https-health-checks",
310 feature = "image-family-views",
311 feature = "images",
312 feature = "instance-group-manager-resize-requests",
313 feature = "instance-group-managers",
314 feature = "instance-groups",
315 feature = "instance-settings",
316 feature = "instance-templates",
317 feature = "instances",
318 feature = "instant-snapshots",
319 feature = "interconnect-attachment-groups",
320 feature = "interconnect-attachments",
321 feature = "interconnect-groups",
322 feature = "interconnect-locations",
323 feature = "interconnect-remote-locations",
324 feature = "interconnects",
325 feature = "license-codes",
326 feature = "licenses",
327 feature = "machine-images",
328 feature = "machine-types",
329 feature = "network-attachments",
330 feature = "network-edge-security-services",
331 feature = "network-endpoint-groups",
332 feature = "network-firewall-policies",
333 feature = "network-profiles",
334 feature = "networks",
335 feature = "node-groups",
336 feature = "node-templates",
337 feature = "node-types",
338 feature = "organization-security-policies",
339 feature = "packet-mirrorings",
340 feature = "preview-features",
341 feature = "projects",
342 feature = "public-advertised-prefixes",
343 feature = "public-delegated-prefixes",
344 feature = "region-autoscalers",
345 feature = "region-backend-services",
346 feature = "region-commitments",
347 feature = "region-disk-types",
348 feature = "region-disks",
349 feature = "region-health-check-services",
350 feature = "region-health-checks",
351 feature = "region-instance-group-managers",
352 feature = "region-instance-groups",
353 feature = "region-instance-templates",
354 feature = "region-instances",
355 feature = "region-instant-snapshots",
356 feature = "region-network-endpoint-groups",
357 feature = "region-network-firewall-policies",
358 feature = "region-notification-endpoints",
359 feature = "region-operations",
360 feature = "region-security-policies",
361 feature = "region-ssl-certificates",
362 feature = "region-ssl-policies",
363 feature = "region-target-http-proxies",
364 feature = "region-target-https-proxies",
365 feature = "region-target-tcp-proxies",
366 feature = "region-url-maps",
367 feature = "region-zones",
368 feature = "regions",
369 feature = "reservation-blocks",
370 feature = "reservation-sub-blocks",
371 feature = "reservations",
372 feature = "resource-policies",
373 feature = "routers",
374 feature = "routes",
375 feature = "security-policies",
376 feature = "service-attachments",
377 feature = "snapshot-settings",
378 feature = "snapshots",
379 feature = "ssl-certificates",
380 feature = "ssl-policies",
381 feature = "storage-pool-types",
382 feature = "storage-pools",
383 feature = "subnetworks",
384 feature = "target-grpc-proxies",
385 feature = "target-http-proxies",
386 feature = "target-https-proxies",
387 feature = "target-instances",
388 feature = "target-pools",
389 feature = "target-ssl-proxies",
390 feature = "target-tcp-proxies",
391 feature = "target-vpn-gateways",
392 feature = "url-maps",
393 feature = "vpn-gateways",
394 feature = "vpn-tunnels",
395 feature = "wire-groups",
396 feature = "zone-operations",
397 feature = "zones",
398))]
399pub(crate) mod info {
400 const NAME: &str = env!("CARGO_PKG_NAME");
401 const VERSION: &str = env!("CARGO_PKG_VERSION");
402 lazy_static::lazy_static! {
403 pub(crate) static ref X_GOOG_API_CLIENT_HEADER: String = {
404 let ac = gaxi::api_header::XGoogApiClient{
405 name: NAME,
406 version: VERSION,
407 library_type: gaxi::api_header::GAPIC,
408 };
409 ac.rest_header_value()
410 };
411 }
412}
413
414pub mod errors;
415pub mod operation;