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