Skip to main content

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 "20260113" 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//! * [ReservationSlots](client/struct.ReservationSlots.html)
116//! * [ReservationSubBlocks](client/struct.ReservationSubBlocks.html)
117//! * [Reservations](client/struct.Reservations.html)
118//! * [ResourcePolicies](client/struct.ResourcePolicies.html)
119//! * [Routers](client/struct.Routers.html)
120//! * [Routes](client/struct.Routes.html)
121//! * [SecurityPolicies](client/struct.SecurityPolicies.html)
122//! * [ServiceAttachments](client/struct.ServiceAttachments.html)
123//! * [SnapshotSettings](client/struct.SnapshotSettings.html)
124//! * [Snapshots](client/struct.Snapshots.html)
125//! * [SslCertificates](client/struct.SslCertificates.html)
126//! * [SslPolicies](client/struct.SslPolicies.html)
127//! * [StoragePoolTypes](client/struct.StoragePoolTypes.html)
128//! * [StoragePools](client/struct.StoragePools.html)
129//! * [Subnetworks](client/struct.Subnetworks.html)
130//! * [TargetGrpcProxies](client/struct.TargetGrpcProxies.html)
131//! * [TargetHttpProxies](client/struct.TargetHttpProxies.html)
132//! * [TargetHttpsProxies](client/struct.TargetHttpsProxies.html)
133//! * [TargetInstances](client/struct.TargetInstances.html)
134//! * [TargetPools](client/struct.TargetPools.html)
135//! * [TargetSslProxies](client/struct.TargetSslProxies.html)
136//! * [TargetTcpProxies](client/struct.TargetTcpProxies.html)
137//! * [TargetVpnGateways](client/struct.TargetVpnGateways.html)
138//! * [UrlMaps](client/struct.UrlMaps.html)
139//! * [VpnGateways](client/struct.VpnGateways.html)
140//! * [VpnTunnels](client/struct.VpnTunnels.html)
141//! * [WireGroups](client/struct.WireGroups.html)
142//! * [ZoneOperations](client/struct.ZoneOperations.html)
143//! * [Zones](client/struct.Zones.html)
144//!
145//! # Features
146//!
147//! - `default-rustls-provider`: enabled by default. Use the default rustls
148//!   crypto provider ([aws-lc-rs]) for TLS and authentication. Applications
149//!   with specific requirements for cryptography (such as exclusively using the
150//!   [ring] crate) should disable this default and call
151//!   `rustls::crypto::CryptoProvider::install_default()`.
152//! - Each client can be enabled using its own feature. Use the client's name
153//!   in `kebab-case` to enable the client.
154//!
155//! [aws-lc-rs]: https://crates.io/crates/aws-lc-rs
156//! [ring]: https://crates.io/crates/ring
157
158#![cfg_attr(docsrs, feature(doc_cfg))]
159#![allow(deprecated)]
160
161/// The messages and enums that are part of this client library.
162#[allow(clippy::module_inception)]
163pub mod model;
164
165pub use gax::Result;
166pub use gax::error::Error;
167
168#[allow(rustdoc::invalid_html_tags)]
169#[allow(rustdoc::redundant_explicit_links)]
170pub mod stub;
171
172/// Concrete implementations of this client library traits.
173pub mod client;
174
175/// Request builders.
176pub mod builder;
177
178#[doc(hidden)]
179pub(crate) mod tracing;
180
181#[doc(hidden)]
182pub(crate) mod transport;
183
184/// The default host used by the service.
185#[cfg(any(
186    feature = "accelerator-types",
187    feature = "addresses",
188    feature = "advice",
189    feature = "autoscalers",
190    feature = "backend-buckets",
191    feature = "backend-services",
192    feature = "cross-site-networks",
193    feature = "disk-types",
194    feature = "disks",
195    feature = "external-vpn-gateways",
196    feature = "firewall-policies",
197    feature = "firewalls",
198    feature = "forwarding-rules",
199    feature = "future-reservations",
200    feature = "global-addresses",
201    feature = "global-forwarding-rules",
202    feature = "global-network-endpoint-groups",
203    feature = "global-operations",
204    feature = "global-organization-operations",
205    feature = "global-public-delegated-prefixes",
206    feature = "health-checks",
207    feature = "http-health-checks",
208    feature = "https-health-checks",
209    feature = "image-family-views",
210    feature = "images",
211    feature = "instance-group-manager-resize-requests",
212    feature = "instance-group-managers",
213    feature = "instance-groups",
214    feature = "instance-settings",
215    feature = "instance-templates",
216    feature = "instances",
217    feature = "instant-snapshots",
218    feature = "interconnect-attachment-groups",
219    feature = "interconnect-attachments",
220    feature = "interconnect-groups",
221    feature = "interconnect-locations",
222    feature = "interconnect-remote-locations",
223    feature = "interconnects",
224    feature = "license-codes",
225    feature = "licenses",
226    feature = "machine-images",
227    feature = "machine-types",
228    feature = "network-attachments",
229    feature = "network-edge-security-services",
230    feature = "network-endpoint-groups",
231    feature = "network-firewall-policies",
232    feature = "network-profiles",
233    feature = "networks",
234    feature = "node-groups",
235    feature = "node-templates",
236    feature = "node-types",
237    feature = "organization-security-policies",
238    feature = "packet-mirrorings",
239    feature = "preview-features",
240    feature = "projects",
241    feature = "public-advertised-prefixes",
242    feature = "public-delegated-prefixes",
243    feature = "region-autoscalers",
244    feature = "region-backend-services",
245    feature = "region-commitments",
246    feature = "region-disk-types",
247    feature = "region-disks",
248    feature = "region-health-check-services",
249    feature = "region-health-checks",
250    feature = "region-instance-group-managers",
251    feature = "region-instance-groups",
252    feature = "region-instance-templates",
253    feature = "region-instances",
254    feature = "region-instant-snapshots",
255    feature = "region-network-endpoint-groups",
256    feature = "region-network-firewall-policies",
257    feature = "region-notification-endpoints",
258    feature = "region-operations",
259    feature = "region-security-policies",
260    feature = "region-ssl-certificates",
261    feature = "region-ssl-policies",
262    feature = "region-target-http-proxies",
263    feature = "region-target-https-proxies",
264    feature = "region-target-tcp-proxies",
265    feature = "region-url-maps",
266    feature = "region-zones",
267    feature = "regions",
268    feature = "reservation-blocks",
269    feature = "reservation-slots",
270    feature = "reservation-sub-blocks",
271    feature = "reservations",
272    feature = "resource-policies",
273    feature = "routers",
274    feature = "routes",
275    feature = "security-policies",
276    feature = "service-attachments",
277    feature = "snapshot-settings",
278    feature = "snapshots",
279    feature = "ssl-certificates",
280    feature = "ssl-policies",
281    feature = "storage-pool-types",
282    feature = "storage-pools",
283    feature = "subnetworks",
284    feature = "target-grpc-proxies",
285    feature = "target-http-proxies",
286    feature = "target-https-proxies",
287    feature = "target-instances",
288    feature = "target-pools",
289    feature = "target-ssl-proxies",
290    feature = "target-tcp-proxies",
291    feature = "target-vpn-gateways",
292    feature = "url-maps",
293    feature = "vpn-gateways",
294    feature = "vpn-tunnels",
295    feature = "wire-groups",
296    feature = "zone-operations",
297    feature = "zones",
298))]
299const DEFAULT_HOST: &str = "https://compute.googleapis.com/";
300
301#[cfg(any(
302    feature = "accelerator-types",
303    feature = "addresses",
304    feature = "advice",
305    feature = "autoscalers",
306    feature = "backend-buckets",
307    feature = "backend-services",
308    feature = "cross-site-networks",
309    feature = "disk-types",
310    feature = "disks",
311    feature = "external-vpn-gateways",
312    feature = "firewall-policies",
313    feature = "firewalls",
314    feature = "forwarding-rules",
315    feature = "future-reservations",
316    feature = "global-addresses",
317    feature = "global-forwarding-rules",
318    feature = "global-network-endpoint-groups",
319    feature = "global-operations",
320    feature = "global-organization-operations",
321    feature = "global-public-delegated-prefixes",
322    feature = "health-checks",
323    feature = "http-health-checks",
324    feature = "https-health-checks",
325    feature = "image-family-views",
326    feature = "images",
327    feature = "instance-group-manager-resize-requests",
328    feature = "instance-group-managers",
329    feature = "instance-groups",
330    feature = "instance-settings",
331    feature = "instance-templates",
332    feature = "instances",
333    feature = "instant-snapshots",
334    feature = "interconnect-attachment-groups",
335    feature = "interconnect-attachments",
336    feature = "interconnect-groups",
337    feature = "interconnect-locations",
338    feature = "interconnect-remote-locations",
339    feature = "interconnects",
340    feature = "license-codes",
341    feature = "licenses",
342    feature = "machine-images",
343    feature = "machine-types",
344    feature = "network-attachments",
345    feature = "network-edge-security-services",
346    feature = "network-endpoint-groups",
347    feature = "network-firewall-policies",
348    feature = "network-profiles",
349    feature = "networks",
350    feature = "node-groups",
351    feature = "node-templates",
352    feature = "node-types",
353    feature = "organization-security-policies",
354    feature = "packet-mirrorings",
355    feature = "preview-features",
356    feature = "projects",
357    feature = "public-advertised-prefixes",
358    feature = "public-delegated-prefixes",
359    feature = "region-autoscalers",
360    feature = "region-backend-services",
361    feature = "region-commitments",
362    feature = "region-disk-types",
363    feature = "region-disks",
364    feature = "region-health-check-services",
365    feature = "region-health-checks",
366    feature = "region-instance-group-managers",
367    feature = "region-instance-groups",
368    feature = "region-instance-templates",
369    feature = "region-instances",
370    feature = "region-instant-snapshots",
371    feature = "region-network-endpoint-groups",
372    feature = "region-network-firewall-policies",
373    feature = "region-notification-endpoints",
374    feature = "region-operations",
375    feature = "region-security-policies",
376    feature = "region-ssl-certificates",
377    feature = "region-ssl-policies",
378    feature = "region-target-http-proxies",
379    feature = "region-target-https-proxies",
380    feature = "region-target-tcp-proxies",
381    feature = "region-url-maps",
382    feature = "region-zones",
383    feature = "regions",
384    feature = "reservation-blocks",
385    feature = "reservation-slots",
386    feature = "reservation-sub-blocks",
387    feature = "reservations",
388    feature = "resource-policies",
389    feature = "routers",
390    feature = "routes",
391    feature = "security-policies",
392    feature = "service-attachments",
393    feature = "snapshot-settings",
394    feature = "snapshots",
395    feature = "ssl-certificates",
396    feature = "ssl-policies",
397    feature = "storage-pool-types",
398    feature = "storage-pools",
399    feature = "subnetworks",
400    feature = "target-grpc-proxies",
401    feature = "target-http-proxies",
402    feature = "target-https-proxies",
403    feature = "target-instances",
404    feature = "target-pools",
405    feature = "target-ssl-proxies",
406    feature = "target-tcp-proxies",
407    feature = "target-vpn-gateways",
408    feature = "url-maps",
409    feature = "vpn-gateways",
410    feature = "vpn-tunnels",
411    feature = "wire-groups",
412    feature = "zone-operations",
413    feature = "zones",
414))]
415pub(crate) mod info {
416    const NAME: &str = env!("CARGO_PKG_NAME");
417    const VERSION: &str = env!("CARGO_PKG_VERSION");
418    lazy_static::lazy_static! {
419        pub(crate) static ref X_GOOG_API_CLIENT_HEADER: String = {
420            let ac = gaxi::api_header::XGoogApiClient{
421                name:          NAME,
422                version:       VERSION,
423                library_type:  gaxi::api_header::GAPIC,
424            };
425            ac.rest_header_value()
426        };
427    }
428}
429
430pub mod errors;
431pub mod operation;