google_container1/lib.rs
1// DO NOT EDIT !
2// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
3// DO NOT EDIT !
4
5//! This documentation was generated from *Container* crate version *7.0.0+20251216*, where *20251216* is the exact revision of the *container:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v7.0.0*.
6//!
7//! Everything else about the *Container* *v1* API can be found at the
8//! [official documentation site](https://cloud.google.com/kubernetes-engine/docs/).
9//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/container1).
10//! # Features
11//!
12//! Handle the following *Resources* with ease from the central [hub](Container) ...
13//!
14//! * projects
15//! * [*aggregated usable subnetworks list*](api::ProjectAggregatedUsableSubnetworkListCall), [*locations clusters check autopilot compatibility*](api::ProjectLocationClusterCheckAutopilotCompatibilityCall), [*locations clusters complete ip rotation*](api::ProjectLocationClusterCompleteIpRotationCall), [*locations clusters create*](api::ProjectLocationClusterCreateCall), [*locations clusters delete*](api::ProjectLocationClusterDeleteCall), [*locations clusters fetch cluster upgrade info*](api::ProjectLocationClusterFetchClusterUpgradeInfoCall), [*locations clusters get*](api::ProjectLocationClusterGetCall), [*locations clusters get jwks*](api::ProjectLocationClusterGetJwkCall), [*locations clusters list*](api::ProjectLocationClusterListCall), [*locations clusters node pools complete upgrade*](api::ProjectLocationClusterNodePoolCompleteUpgradeCall), [*locations clusters node pools create*](api::ProjectLocationClusterNodePoolCreateCall), [*locations clusters node pools delete*](api::ProjectLocationClusterNodePoolDeleteCall), [*locations clusters node pools fetch node pool upgrade info*](api::ProjectLocationClusterNodePoolFetchNodePoolUpgradeInfoCall), [*locations clusters node pools get*](api::ProjectLocationClusterNodePoolGetCall), [*locations clusters node pools list*](api::ProjectLocationClusterNodePoolListCall), [*locations clusters node pools rollback*](api::ProjectLocationClusterNodePoolRollbackCall), [*locations clusters node pools set autoscaling*](api::ProjectLocationClusterNodePoolSetAutoscalingCall), [*locations clusters node pools set management*](api::ProjectLocationClusterNodePoolSetManagementCall), [*locations clusters node pools set size*](api::ProjectLocationClusterNodePoolSetSizeCall), [*locations clusters node pools update*](api::ProjectLocationClusterNodePoolUpdateCall), [*locations clusters set addons*](api::ProjectLocationClusterSetAddonCall), [*locations clusters set legacy abac*](api::ProjectLocationClusterSetLegacyAbacCall), [*locations clusters set locations*](api::ProjectLocationClusterSetLocationCall), [*locations clusters set logging*](api::ProjectLocationClusterSetLoggingCall), [*locations clusters set maintenance policy*](api::ProjectLocationClusterSetMaintenancePolicyCall), [*locations clusters set master auth*](api::ProjectLocationClusterSetMasterAuthCall), [*locations clusters set monitoring*](api::ProjectLocationClusterSetMonitoringCall), [*locations clusters set network policy*](api::ProjectLocationClusterSetNetworkPolicyCall), [*locations clusters set resource labels*](api::ProjectLocationClusterSetResourceLabelCall), [*locations clusters start ip rotation*](api::ProjectLocationClusterStartIpRotationCall), [*locations clusters update*](api::ProjectLocationClusterUpdateCall), [*locations clusters update master*](api::ProjectLocationClusterUpdateMasterCall), [*locations clusters well-known get openid-configuration*](api::ProjectLocationClusterWellKnownGetOpenidConfigurationCall), [*locations get server config*](api::ProjectLocationGetServerConfigCall), [*locations operations cancel*](api::ProjectLocationOperationCancelCall), [*locations operations get*](api::ProjectLocationOperationGetCall), [*locations operations list*](api::ProjectLocationOperationListCall), [*zones clusters addons*](api::ProjectZoneClusterAddonCall), [*zones clusters complete ip rotation*](api::ProjectZoneClusterCompleteIpRotationCall), [*zones clusters create*](api::ProjectZoneClusterCreateCall), [*zones clusters delete*](api::ProjectZoneClusterDeleteCall), [*zones clusters fetch cluster upgrade info*](api::ProjectZoneClusterFetchClusterUpgradeInfoCall), [*zones clusters get*](api::ProjectZoneClusterGetCall), [*zones clusters legacy abac*](api::ProjectZoneClusterLegacyAbacCall), [*zones clusters list*](api::ProjectZoneClusterListCall), [*zones clusters locations*](api::ProjectZoneClusterLocationCall), [*zones clusters logging*](api::ProjectZoneClusterLoggingCall), [*zones clusters master*](api::ProjectZoneClusterMasterCall), [*zones clusters monitoring*](api::ProjectZoneClusterMonitoringCall), [*zones clusters node pools autoscaling*](api::ProjectZoneClusterNodePoolAutoscalingCall), [*zones clusters node pools create*](api::ProjectZoneClusterNodePoolCreateCall), [*zones clusters node pools delete*](api::ProjectZoneClusterNodePoolDeleteCall), [*zones clusters node pools fetch node pool upgrade info*](api::ProjectZoneClusterNodePoolFetchNodePoolUpgradeInfoCall), [*zones clusters node pools get*](api::ProjectZoneClusterNodePoolGetCall), [*zones clusters node pools list*](api::ProjectZoneClusterNodePoolListCall), [*zones clusters node pools rollback*](api::ProjectZoneClusterNodePoolRollbackCall), [*zones clusters node pools set management*](api::ProjectZoneClusterNodePoolSetManagementCall), [*zones clusters node pools set size*](api::ProjectZoneClusterNodePoolSetSizeCall), [*zones clusters node pools update*](api::ProjectZoneClusterNodePoolUpdateCall), [*zones clusters resource labels*](api::ProjectZoneClusterResourceLabelCall), [*zones clusters set maintenance policy*](api::ProjectZoneClusterSetMaintenancePolicyCall), [*zones clusters set master auth*](api::ProjectZoneClusterSetMasterAuthCall), [*zones clusters set network policy*](api::ProjectZoneClusterSetNetworkPolicyCall), [*zones clusters start ip rotation*](api::ProjectZoneClusterStartIpRotationCall), [*zones clusters update*](api::ProjectZoneClusterUpdateCall), [*zones get serverconfig*](api::ProjectZoneGetServerconfigCall), [*zones operations cancel*](api::ProjectZoneOperationCancelCall), [*zones operations get*](api::ProjectZoneOperationGetCall) and [*zones operations list*](api::ProjectZoneOperationListCall)
16//!
17//!
18//!
19//!
20//! Not what you are looking for ? Find all other Google APIs in their Rust [documentation index](http://byron.github.io/google-apis-rs).
21//!
22//! # Structure of this Library
23//!
24//! The API is structured into the following primary items:
25//!
26//! * **[Hub](Container)**
27//! * a central object to maintain state and allow accessing all *Activities*
28//! * creates [*Method Builders*](common::MethodsBuilder) which in turn
29//! allow access to individual [*Call Builders*](common::CallBuilder)
30//! * **[Resources](common::Resource)**
31//! * primary types that you can apply *Activities* to
32//! * a collection of properties and *Parts*
33//! * **[Parts](common::Part)**
34//! * a collection of properties
35//! * never directly used in *Activities*
36//! * **[Activities](common::CallBuilder)**
37//! * operations to apply to *Resources*
38//!
39//! All *structures* are marked with applicable traits to further categorize them and ease browsing.
40//!
41//! Generally speaking, you can invoke *Activities* like this:
42//!
43//! ```Rust,ignore
44//! let r = hub.resource().activity(...).doit().await
45//! ```
46//!
47//! Or specifically ...
48//!
49//! ```ignore
50//! let r = hub.projects().locations_clusters_node_pools_create(...).doit().await
51//! let r = hub.projects().locations_clusters_node_pools_delete(...).doit().await
52//! let r = hub.projects().locations_clusters_node_pools_rollback(...).doit().await
53//! let r = hub.projects().locations_clusters_node_pools_set_autoscaling(...).doit().await
54//! let r = hub.projects().locations_clusters_node_pools_set_management(...).doit().await
55//! let r = hub.projects().locations_clusters_node_pools_set_size(...).doit().await
56//! let r = hub.projects().locations_clusters_node_pools_update(...).doit().await
57//! let r = hub.projects().locations_clusters_complete_ip_rotation(...).doit().await
58//! let r = hub.projects().locations_clusters_create(...).doit().await
59//! let r = hub.projects().locations_clusters_delete(...).doit().await
60//! let r = hub.projects().locations_clusters_set_addons(...).doit().await
61//! let r = hub.projects().locations_clusters_set_legacy_abac(...).doit().await
62//! let r = hub.projects().locations_clusters_set_locations(...).doit().await
63//! let r = hub.projects().locations_clusters_set_logging(...).doit().await
64//! let r = hub.projects().locations_clusters_set_maintenance_policy(...).doit().await
65//! let r = hub.projects().locations_clusters_set_master_auth(...).doit().await
66//! let r = hub.projects().locations_clusters_set_monitoring(...).doit().await
67//! let r = hub.projects().locations_clusters_set_network_policy(...).doit().await
68//! let r = hub.projects().locations_clusters_set_resource_labels(...).doit().await
69//! let r = hub.projects().locations_clusters_start_ip_rotation(...).doit().await
70//! let r = hub.projects().locations_clusters_update(...).doit().await
71//! let r = hub.projects().locations_clusters_update_master(...).doit().await
72//! let r = hub.projects().locations_operations_get(...).doit().await
73//! let r = hub.projects().zones_clusters_node_pools_autoscaling(...).doit().await
74//! let r = hub.projects().zones_clusters_node_pools_create(...).doit().await
75//! let r = hub.projects().zones_clusters_node_pools_delete(...).doit().await
76//! let r = hub.projects().zones_clusters_node_pools_rollback(...).doit().await
77//! let r = hub.projects().zones_clusters_node_pools_set_management(...).doit().await
78//! let r = hub.projects().zones_clusters_node_pools_set_size(...).doit().await
79//! let r = hub.projects().zones_clusters_node_pools_update(...).doit().await
80//! let r = hub.projects().zones_clusters_addons(...).doit().await
81//! let r = hub.projects().zones_clusters_complete_ip_rotation(...).doit().await
82//! let r = hub.projects().zones_clusters_create(...).doit().await
83//! let r = hub.projects().zones_clusters_delete(...).doit().await
84//! let r = hub.projects().zones_clusters_legacy_abac(...).doit().await
85//! let r = hub.projects().zones_clusters_locations(...).doit().await
86//! let r = hub.projects().zones_clusters_logging(...).doit().await
87//! let r = hub.projects().zones_clusters_master(...).doit().await
88//! let r = hub.projects().zones_clusters_monitoring(...).doit().await
89//! let r = hub.projects().zones_clusters_resource_labels(...).doit().await
90//! let r = hub.projects().zones_clusters_set_maintenance_policy(...).doit().await
91//! let r = hub.projects().zones_clusters_set_master_auth(...).doit().await
92//! let r = hub.projects().zones_clusters_set_network_policy(...).doit().await
93//! let r = hub.projects().zones_clusters_start_ip_rotation(...).doit().await
94//! let r = hub.projects().zones_clusters_update(...).doit().await
95//! let r = hub.projects().zones_operations_get(...).doit().await
96//! ```
97//!
98//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
99//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
100//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
101//! The `doit()` method performs the actual communication with the server and returns the respective result.
102//!
103//! # Usage
104//!
105//! ## Setting up your Project
106//!
107//! To use this library, you would put the following lines into your `Cargo.toml` file:
108//!
109//! ```toml
110//! [dependencies]
111//! google-container1 = "*"
112//! serde = "1"
113//! serde_json = "1"
114//! ```
115//!
116//! ## A complete example
117//!
118//! ```test_harness,no_run
119//! extern crate hyper;
120//! extern crate hyper_rustls;
121//! extern crate google_container1 as container1;
122//! use container1::{Result, Error};
123//! # async fn dox() {
124//! use container1::{Container, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
125//!
126//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
127//! // `client_secret`, among other things.
128//! let secret: yup_oauth2::ApplicationSecret = Default::default();
129//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
130//! // unless you replace `None` with the desired Flow.
131//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
132//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
133//! // retrieve them from storage.
134//! let connector = hyper_rustls::HttpsConnectorBuilder::new()
135//! .with_native_roots()
136//! .unwrap()
137//! .https_only()
138//! .enable_http2()
139//! .build();
140//!
141//! let executor = hyper_util::rt::TokioExecutor::new();
142//! let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
143//! secret,
144//! yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
145//! yup_oauth2::client::CustomHyperClientBuilder::from(
146//! hyper_util::client::legacy::Client::builder(executor).build(connector),
147//! ),
148//! ).build().await.unwrap();
149//!
150//! let client = hyper_util::client::legacy::Client::builder(
151//! hyper_util::rt::TokioExecutor::new()
152//! )
153//! .build(
154//! hyper_rustls::HttpsConnectorBuilder::new()
155//! .with_native_roots()
156//! .unwrap()
157//! .https_or_http()
158//! .enable_http2()
159//! .build()
160//! );
161//! let mut hub = Container::new(client, auth);
162//! // You can configure optional parameters by calling the respective setters at will, and
163//! // execute the final call using `doit()`.
164//! // Values shown here are possibly random and not representative !
165//! let result = hub.projects().locations_clusters_node_pools_delete("name")
166//! .zone("sanctus")
167//! .project_id("sed")
168//! .node_pool_id("amet.")
169//! .cluster_id("takimata")
170//! .doit().await;
171//!
172//! match result {
173//! Err(e) => match e {
174//! // The Error enum provides details about what exactly happened.
175//! // You can also just use its `Debug`, `Display` or `Error` traits
176//! Error::HttpError(_)
177//! |Error::Io(_)
178//! |Error::MissingAPIKey
179//! |Error::MissingToken(_)
180//! |Error::Cancelled
181//! |Error::UploadSizeLimitExceeded(_, _)
182//! |Error::Failure(_)
183//! |Error::BadRequest(_)
184//! |Error::FieldClash(_)
185//! |Error::JsonDecodeError(_, _) => println!("{}", e),
186//! },
187//! Ok(res) => println!("Success: {:?}", res),
188//! }
189//! # }
190//! ```
191//! ## Handling Errors
192//!
193//! All errors produced by the system are provided either as [Result](common::Result) enumeration as return value of
194//! the doit() methods, or handed as possibly intermediate results to either the
195//! [Hub Delegate](common::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
196//!
197//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
198//! makes the system potentially resilient to all kinds of errors.
199//!
200//! ## Uploads and Downloads
201//! If a method supports downloads, the response body, which is part of the [Result](common::Result), should be
202//! read by you to obtain the media.
203//! If such a method also supports a [Response Result](common::ResponseResult), it will return that by default.
204//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
205//! this call: `.param("alt", "media")`.
206//!
207//! Methods supporting uploads can do so using up to 2 different protocols:
208//! *simple* and *resumable*. The distinctiveness of each is represented by customized
209//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
210//!
211//! ## Customization and Callbacks
212//!
213//! You may alter the way an `doit()` method is called by providing a [delegate](common::Delegate) to the
214//! [Method Builder](common::CallBuilder) before making the final `doit()` call.
215//! Respective methods will be called to provide progress information, as well as determine whether the system should
216//! retry on failure.
217//!
218//! The [delegate trait](common::Delegate) is default-implemented, allowing you to customize it with minimal effort.
219//!
220//! ## Optional Parts in Server-Requests
221//!
222//! All structures provided by this library are made to be [encodable](common::RequestValue) and
223//! [decodable](common::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
224//! are valid.
225//! Most optionals are are considered [Parts](common::Part) which are identifiable by name, which will be sent to
226//! the server to indicate either the set parts of the request or the desired parts in the response.
227//!
228//! ## Builder Arguments
229//!
230//! Using [method builders](common::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
231//! These will always take a single argument, for which the following statements are true.
232//!
233//! * [PODs][wiki-pod] are handed by copy
234//! * strings are passed as `&str`
235//! * [request values](common::RequestValue) are moved
236//!
237//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
238//!
239//! [wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure
240//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern
241//! [google-go-api]: https://github.com/google/google-api-go-client
242//!
243//! ## Cargo Features
244//!
245//! * `utoipa` - Add support for [utoipa](https://crates.io/crates/utoipa) and derive `utoipa::ToSchema` on all
246//! the types. You'll have to import and register the required types in `#[openapi(schemas(...))]`, otherwise the
247//! generated `openapi` spec would be invalid.
248//!
249//!
250//!
251
252// Unused attributes happen thanks to defined, but unused structures We don't
253// warn about this, as depending on the API, some data structures or facilities
254// are never used. Instead of pre-determining this, we just disable the lint.
255// It's manually tuned to not have any unused imports in fully featured APIs.
256// Same with unused_mut.
257#![allow(unused_imports, unused_mut, dead_code)]
258
259// DO NOT EDIT !
260// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
261// DO NOT EDIT !
262
263pub extern crate hyper;
264pub extern crate hyper_rustls;
265pub extern crate hyper_util;
266#[cfg(feature = "yup-oauth2")]
267pub extern crate yup_oauth2;
268
269pub extern crate google_apis_common as common;
270pub use common::{Delegate, Error, FieldMask, Result};
271
272pub mod api;
273pub use api::Container;