google_appengine1/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 *appengine* crate version *7.0.0+20251210*, where *20251210* is the exact revision of the *appengine:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v7.0.0*.
6//!
7//! Everything else about the *appengine* *v1* API can be found at the
8//! [official documentation site](https://cloud.google.com/appengine/docs/admin-api/).
9//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/appengine1).
10//! # Features
11//!
12//! Handle the following *Resources* with ease from the central [hub](Appengine) ...
13//!
14//! * apps
15//! * [*authorized certificates create*](api::AppAuthorizedCertificateCreateCall), [*authorized certificates delete*](api::AppAuthorizedCertificateDeleteCall), [*authorized certificates get*](api::AppAuthorizedCertificateGetCall), [*authorized certificates list*](api::AppAuthorizedCertificateListCall), [*authorized certificates patch*](api::AppAuthorizedCertificatePatchCall), [*authorized domains list*](api::AppAuthorizedDomainListCall), [*create*](api::AppCreateCall), [*domain mappings create*](api::AppDomainMappingCreateCall), [*domain mappings delete*](api::AppDomainMappingDeleteCall), [*domain mappings get*](api::AppDomainMappingGetCall), [*domain mappings list*](api::AppDomainMappingListCall), [*domain mappings patch*](api::AppDomainMappingPatchCall), [*firewall ingress rules batch update*](api::AppFirewallIngressRuleBatchUpdateCall), [*firewall ingress rules create*](api::AppFirewallIngressRuleCreateCall), [*firewall ingress rules delete*](api::AppFirewallIngressRuleDeleteCall), [*firewall ingress rules get*](api::AppFirewallIngressRuleGetCall), [*firewall ingress rules list*](api::AppFirewallIngressRuleListCall), [*firewall ingress rules patch*](api::AppFirewallIngressRulePatchCall), [*get*](api::AppGetCall), [*list runtimes*](api::AppListRuntimeCall), [*locations get*](api::AppLocationGetCall), [*locations list*](api::AppLocationListCall), [*operations get*](api::AppOperationGetCall), [*operations list*](api::AppOperationListCall), [*patch*](api::AppPatchCall), [*repair*](api::AppRepairCall), [*services delete*](api::AppServiceDeleteCall), [*services get*](api::AppServiceGetCall), [*services list*](api::AppServiceListCall), [*services patch*](api::AppServicePatchCall), [*services versions create*](api::AppServiceVersionCreateCall), [*services versions delete*](api::AppServiceVersionDeleteCall), [*services versions export app image*](api::AppServiceVersionExportAppImageCall), [*services versions get*](api::AppServiceVersionGetCall), [*services versions instances debug*](api::AppServiceVersionInstanceDebugCall), [*services versions instances delete*](api::AppServiceVersionInstanceDeleteCall), [*services versions instances get*](api::AppServiceVersionInstanceGetCall), [*services versions instances list*](api::AppServiceVersionInstanceListCall), [*services versions list*](api::AppServiceVersionListCall) and [*services versions patch*](api::AppServiceVersionPatchCall)
16//! * projects
17//! * [*locations applications authorized certificates create*](api::ProjectLocationApplicationAuthorizedCertificateCreateCall), [*locations applications authorized certificates delete*](api::ProjectLocationApplicationAuthorizedCertificateDeleteCall), [*locations applications authorized certificates get*](api::ProjectLocationApplicationAuthorizedCertificateGetCall), [*locations applications authorized certificates list*](api::ProjectLocationApplicationAuthorizedCertificateListCall), [*locations applications authorized certificates patch*](api::ProjectLocationApplicationAuthorizedCertificatePatchCall), [*locations applications authorized domains list*](api::ProjectLocationApplicationAuthorizedDomainListCall), [*locations applications domain mappings create*](api::ProjectLocationApplicationDomainMappingCreateCall), [*locations applications domain mappings delete*](api::ProjectLocationApplicationDomainMappingDeleteCall), [*locations applications domain mappings get*](api::ProjectLocationApplicationDomainMappingGetCall), [*locations applications domain mappings list*](api::ProjectLocationApplicationDomainMappingListCall), [*locations applications domain mappings patch*](api::ProjectLocationApplicationDomainMappingPatchCall), [*locations applications patch*](api::ProjectLocationApplicationPatchCall), [*locations applications services delete*](api::ProjectLocationApplicationServiceDeleteCall), [*locations applications services patch*](api::ProjectLocationApplicationServicePatchCall), [*locations applications services versions delete*](api::ProjectLocationApplicationServiceVersionDeleteCall), [*locations applications services versions export app image*](api::ProjectLocationApplicationServiceVersionExportAppImageCall) and [*locations applications services versions patch*](api::ProjectLocationApplicationServiceVersionPatchCall)
18//!
19//!
20//!
21//!
22//! Not what you are looking for ? Find all other Google APIs in their Rust [documentation index](http://byron.github.io/google-apis-rs).
23//!
24//! # Structure of this Library
25//!
26//! The API is structured into the following primary items:
27//!
28//! * **[Hub](Appengine)**
29//! * a central object to maintain state and allow accessing all *Activities*
30//! * creates [*Method Builders*](common::MethodsBuilder) which in turn
31//! allow access to individual [*Call Builders*](common::CallBuilder)
32//! * **[Resources](common::Resource)**
33//! * primary types that you can apply *Activities* to
34//! * a collection of properties and *Parts*
35//! * **[Parts](common::Part)**
36//! * a collection of properties
37//! * never directly used in *Activities*
38//! * **[Activities](common::CallBuilder)**
39//! * operations to apply to *Resources*
40//!
41//! All *structures* are marked with applicable traits to further categorize them and ease browsing.
42//!
43//! Generally speaking, you can invoke *Activities* like this:
44//!
45//! ```Rust,ignore
46//! let r = hub.resource().activity(...).doit().await
47//! ```
48//!
49//! Or specifically ...
50//!
51//! ```ignore
52//! let r = hub.apps().domain_mappings_create(...).doit().await
53//! let r = hub.apps().domain_mappings_delete(...).doit().await
54//! let r = hub.apps().domain_mappings_patch(...).doit().await
55//! let r = hub.apps().operations_get(...).doit().await
56//! let r = hub.apps().services_versions_instances_debug(...).doit().await
57//! let r = hub.apps().services_versions_instances_delete(...).doit().await
58//! let r = hub.apps().services_versions_create(...).doit().await
59//! let r = hub.apps().services_versions_delete(...).doit().await
60//! let r = hub.apps().services_versions_export_app_image(...).doit().await
61//! let r = hub.apps().services_versions_patch(...).doit().await
62//! let r = hub.apps().services_delete(...).doit().await
63//! let r = hub.apps().services_patch(...).doit().await
64//! let r = hub.apps().create(...).doit().await
65//! let r = hub.apps().patch(...).doit().await
66//! let r = hub.apps().repair(...).doit().await
67//! let r = hub.projects().locations_applications_domain_mappings_create(...).doit().await
68//! let r = hub.projects().locations_applications_domain_mappings_delete(...).doit().await
69//! let r = hub.projects().locations_applications_domain_mappings_patch(...).doit().await
70//! let r = hub.projects().locations_applications_services_versions_delete(...).doit().await
71//! let r = hub.projects().locations_applications_services_versions_export_app_image(...).doit().await
72//! let r = hub.projects().locations_applications_services_versions_patch(...).doit().await
73//! let r = hub.projects().locations_applications_services_delete(...).doit().await
74//! let r = hub.projects().locations_applications_services_patch(...).doit().await
75//! let r = hub.projects().locations_applications_patch(...).doit().await
76//! ```
77//!
78//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
79//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
80//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
81//! The `doit()` method performs the actual communication with the server and returns the respective result.
82//!
83//! # Usage
84//!
85//! ## Setting up your Project
86//!
87//! To use this library, you would put the following lines into your `Cargo.toml` file:
88//!
89//! ```toml
90//! [dependencies]
91//! google-appengine1 = "*"
92//! serde = "1"
93//! serde_json = "1"
94//! ```
95//!
96//! ## A complete example
97//!
98//! ```test_harness,no_run
99//! extern crate hyper;
100//! extern crate hyper_rustls;
101//! extern crate google_appengine1 as appengine1;
102//! use appengine1::api::Version;
103//! use appengine1::{Result, Error};
104//! # async fn dox() {
105//! use appengine1::{Appengine, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
106//!
107//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
108//! // `client_secret`, among other things.
109//! let secret: yup_oauth2::ApplicationSecret = Default::default();
110//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
111//! // unless you replace `None` with the desired Flow.
112//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
113//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
114//! // retrieve them from storage.
115//! let connector = hyper_rustls::HttpsConnectorBuilder::new()
116//! .with_native_roots()
117//! .unwrap()
118//! .https_only()
119//! .enable_http2()
120//! .build();
121//!
122//! let executor = hyper_util::rt::TokioExecutor::new();
123//! let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
124//! secret,
125//! yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
126//! yup_oauth2::client::CustomHyperClientBuilder::from(
127//! hyper_util::client::legacy::Client::builder(executor).build(connector),
128//! ),
129//! ).build().await.unwrap();
130//!
131//! let client = hyper_util::client::legacy::Client::builder(
132//! hyper_util::rt::TokioExecutor::new()
133//! )
134//! .build(
135//! hyper_rustls::HttpsConnectorBuilder::new()
136//! .with_native_roots()
137//! .unwrap()
138//! .https_or_http()
139//! .enable_http2()
140//! .build()
141//! );
142//! let mut hub = Appengine::new(client, auth);
143//! // As the method needs a request, you would usually fill it with the desired information
144//! // into the respective structure. Some of the parts shown here might not be applicable !
145//! // Values shown here are possibly random and not representative !
146//! let mut req = Version::default();
147//!
148//! // You can configure optional parameters by calling the respective setters at will, and
149//! // execute the final call using `doit()`.
150//! // Values shown here are possibly random and not representative !
151//! let result = hub.projects().locations_applications_services_versions_patch(req, "projectsId", "locationsId", "applicationsId", "servicesId", "versionsId")
152//! .update_mask(FieldMask::new::<&str>(&[]))
153//! .doit().await;
154//!
155//! match result {
156//! Err(e) => match e {
157//! // The Error enum provides details about what exactly happened.
158//! // You can also just use its `Debug`, `Display` or `Error` traits
159//! Error::HttpError(_)
160//! |Error::Io(_)
161//! |Error::MissingAPIKey
162//! |Error::MissingToken(_)
163//! |Error::Cancelled
164//! |Error::UploadSizeLimitExceeded(_, _)
165//! |Error::Failure(_)
166//! |Error::BadRequest(_)
167//! |Error::FieldClash(_)
168//! |Error::JsonDecodeError(_, _) => println!("{}", e),
169//! },
170//! Ok(res) => println!("Success: {:?}", res),
171//! }
172//! # }
173//! ```
174//! ## Handling Errors
175//!
176//! All errors produced by the system are provided either as [Result](common::Result) enumeration as return value of
177//! the doit() methods, or handed as possibly intermediate results to either the
178//! [Hub Delegate](common::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
179//!
180//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
181//! makes the system potentially resilient to all kinds of errors.
182//!
183//! ## Uploads and Downloads
184//! If a method supports downloads, the response body, which is part of the [Result](common::Result), should be
185//! read by you to obtain the media.
186//! If such a method also supports a [Response Result](common::ResponseResult), it will return that by default.
187//! 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
188//! this call: `.param("alt", "media")`.
189//!
190//! Methods supporting uploads can do so using up to 2 different protocols:
191//! *simple* and *resumable*. The distinctiveness of each is represented by customized
192//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
193//!
194//! ## Customization and Callbacks
195//!
196//! You may alter the way an `doit()` method is called by providing a [delegate](common::Delegate) to the
197//! [Method Builder](common::CallBuilder) before making the final `doit()` call.
198//! Respective methods will be called to provide progress information, as well as determine whether the system should
199//! retry on failure.
200//!
201//! The [delegate trait](common::Delegate) is default-implemented, allowing you to customize it with minimal effort.
202//!
203//! ## Optional Parts in Server-Requests
204//!
205//! All structures provided by this library are made to be [encodable](common::RequestValue) and
206//! [decodable](common::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
207//! are valid.
208//! Most optionals are are considered [Parts](common::Part) which are identifiable by name, which will be sent to
209//! the server to indicate either the set parts of the request or the desired parts in the response.
210//!
211//! ## Builder Arguments
212//!
213//! Using [method builders](common::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
214//! These will always take a single argument, for which the following statements are true.
215//!
216//! * [PODs][wiki-pod] are handed by copy
217//! * strings are passed as `&str`
218//! * [request values](common::RequestValue) are moved
219//!
220//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
221//!
222//! [wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure
223//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern
224//! [google-go-api]: https://github.com/google/google-api-go-client
225//!
226//! ## Cargo Features
227//!
228//! * `utoipa` - Add support for [utoipa](https://crates.io/crates/utoipa) and derive `utoipa::ToSchema` on all
229//! the types. You'll have to import and register the required types in `#[openapi(schemas(...))]`, otherwise the
230//! generated `openapi` spec would be invalid.
231//!
232//!
233//!
234
235// Unused attributes happen thanks to defined, but unused structures We don't
236// warn about this, as depending on the API, some data structures or facilities
237// are never used. Instead of pre-determining this, we just disable the lint.
238// It's manually tuned to not have any unused imports in fully featured APIs.
239// Same with unused_mut.
240#![allow(unused_imports, unused_mut, dead_code)]
241
242// DO NOT EDIT !
243// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
244// DO NOT EDIT !
245
246pub extern crate hyper;
247pub extern crate hyper_rustls;
248pub extern crate hyper_util;
249#[cfg(feature = "yup-oauth2")]
250pub extern crate yup_oauth2;
251
252pub extern crate google_apis_common as common;
253pub use common::{Delegate, Error, FieldMask, Result};
254
255pub mod api;
256pub use api::Appengine;