google_firebasehosting1_beta1/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 *Firebase Hosting* crate version *7.0.0+20251214*, where *20251214* is the exact revision of the *firebasehosting:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v7.0.0*.
6//!
7//! Everything else about the *Firebase Hosting* *v1_beta1* API can be found at the
8//! [official documentation site](https://firebase.google.com/docs/hosting/).
9//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/firebasehosting1_beta1).
10//! # Features
11//!
12//! Handle the following *Resources* with ease from the central [hub](FirebaseHosting) ...
13//!
14//! * projects
15//! * [*operations get*](api::ProjectOperationGetCall), [*sites channels create*](api::ProjectSiteChannelCreateCall), [*sites channels delete*](api::ProjectSiteChannelDeleteCall), [*sites channels get*](api::ProjectSiteChannelGetCall), [*sites channels list*](api::ProjectSiteChannelListCall), [*sites channels patch*](api::ProjectSiteChannelPatchCall), [*sites channels releases create*](api::ProjectSiteChannelReleaseCreateCall), [*sites channels releases get*](api::ProjectSiteChannelReleaseGetCall), [*sites channels releases list*](api::ProjectSiteChannelReleaseListCall), [*sites create*](api::ProjectSiteCreateCall), [*sites custom domains create*](api::ProjectSiteCustomDomainCreateCall), [*sites custom domains delete*](api::ProjectSiteCustomDomainDeleteCall), [*sites custom domains get*](api::ProjectSiteCustomDomainGetCall), [*sites custom domains list*](api::ProjectSiteCustomDomainListCall), [*sites custom domains operations get*](api::ProjectSiteCustomDomainOperationGetCall), [*sites custom domains operations list*](api::ProjectSiteCustomDomainOperationListCall), [*sites custom domains patch*](api::ProjectSiteCustomDomainPatchCall), [*sites custom domains undelete*](api::ProjectSiteCustomDomainUndeleteCall), [*sites delete*](api::ProjectSiteDeleteCall), [*sites domains create*](api::ProjectSiteDomainCreateCall), [*sites domains delete*](api::ProjectSiteDomainDeleteCall), [*sites domains get*](api::ProjectSiteDomainGetCall), [*sites domains list*](api::ProjectSiteDomainListCall), [*sites domains update*](api::ProjectSiteDomainUpdateCall), [*sites get*](api::ProjectSiteGetCall), [*sites get config*](api::ProjectSiteGetConfigCall), [*sites list*](api::ProjectSiteListCall), [*sites patch*](api::ProjectSitePatchCall), [*sites releases create*](api::ProjectSiteReleaseCreateCall), [*sites releases get*](api::ProjectSiteReleaseGetCall), [*sites releases list*](api::ProjectSiteReleaseListCall), [*sites update config*](api::ProjectSiteUpdateConfigCall), [*sites versions clone*](api::ProjectSiteVersionCloneCall), [*sites versions create*](api::ProjectSiteVersionCreateCall), [*sites versions delete*](api::ProjectSiteVersionDeleteCall), [*sites versions files list*](api::ProjectSiteVersionFileListCall), [*sites versions get*](api::ProjectSiteVersionGetCall), [*sites versions list*](api::ProjectSiteVersionListCall), [*sites versions patch*](api::ProjectSiteVersionPatchCall) and [*sites versions populate files*](api::ProjectSiteVersionPopulateFileCall)
16//! * [sites](api::Site)
17//! * [*channels create*](api::SiteChannelCreateCall), [*channels delete*](api::SiteChannelDeleteCall), [*channels get*](api::SiteChannelGetCall), [*channels list*](api::SiteChannelListCall), [*channels patch*](api::SiteChannelPatchCall), [*channels releases create*](api::SiteChannelReleaseCreateCall), [*channels releases get*](api::SiteChannelReleaseGetCall), [*channels releases list*](api::SiteChannelReleaseListCall), [*domains create*](api::SiteDomainCreateCall), [*domains delete*](api::SiteDomainDeleteCall), [*domains get*](api::SiteDomainGetCall), [*domains list*](api::SiteDomainListCall), [*domains update*](api::SiteDomainUpdateCall), [*get config*](api::SiteGetConfigCall), [*releases create*](api::SiteReleaseCreateCall), [*releases get*](api::SiteReleaseGetCall), [*releases list*](api::SiteReleaseListCall), [*update config*](api::SiteUpdateConfigCall), [*versions clone*](api::SiteVersionCloneCall), [*versions create*](api::SiteVersionCreateCall), [*versions delete*](api::SiteVersionDeleteCall), [*versions files list*](api::SiteVersionFileListCall), [*versions get*](api::SiteVersionGetCall), [*versions list*](api::SiteVersionListCall), [*versions patch*](api::SiteVersionPatchCall) and [*versions populate files*](api::SiteVersionPopulateFileCall)
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](FirebaseHosting)**
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.projects().sites_create(...).doit().await
53//! let r = hub.projects().sites_get(...).doit().await
54//! let r = hub.projects().sites_patch(...).doit().await
55//! let r = hub.sites().channels_releases_create(...).doit().await
56//! let r = hub.sites().channels_releases_get(...).doit().await
57//! let r = hub.sites().channels_releases_list(...).doit().await
58//! let r = hub.sites().channels_create(...).doit().await
59//! let r = hub.sites().channels_delete(...).doit().await
60//! let r = hub.sites().channels_get(...).doit().await
61//! let r = hub.sites().channels_list(...).doit().await
62//! let r = hub.sites().channels_patch(...).doit().await
63//! let r = hub.sites().domains_create(...).doit().await
64//! let r = hub.sites().domains_delete(...).doit().await
65//! let r = hub.sites().domains_get(...).doit().await
66//! let r = hub.sites().domains_list(...).doit().await
67//! let r = hub.sites().domains_update(...).doit().await
68//! let r = hub.sites().releases_create(...).doit().await
69//! let r = hub.sites().releases_get(...).doit().await
70//! let r = hub.sites().releases_list(...).doit().await
71//! let r = hub.sites().versions_files_list(...).doit().await
72//! let r = hub.sites().versions_clone(...).doit().await
73//! let r = hub.sites().versions_create(...).doit().await
74//! let r = hub.sites().versions_delete(...).doit().await
75//! let r = hub.sites().versions_get(...).doit().await
76//! let r = hub.sites().versions_list(...).doit().await
77//! let r = hub.sites().versions_patch(...).doit().await
78//! let r = hub.sites().versions_populate_files(...).doit().await
79//! let r = hub.sites().get_config(...).doit().await
80//! let r = hub.sites().update_config(...).doit().await
81//! ```
82//!
83//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
84//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
85//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
86//! The `doit()` method performs the actual communication with the server and returns the respective result.
87//!
88//! # Usage
89//!
90//! ## Setting up your Project
91//!
92//! To use this library, you would put the following lines into your `Cargo.toml` file:
93//!
94//! ```toml
95//! [dependencies]
96//! google-firebasehosting1_beta1 = "*"
97//! serde = "1"
98//! serde_json = "1"
99//! ```
100//!
101//! ## A complete example
102//!
103//! ```test_harness,no_run
104//! extern crate hyper;
105//! extern crate hyper_rustls;
106//! extern crate google_firebasehosting1_beta1 as firebasehosting1_beta1;
107//! use firebasehosting1_beta1::api::Site;
108//! use firebasehosting1_beta1::{Result, Error};
109//! # async fn dox() {
110//! use firebasehosting1_beta1::{FirebaseHosting, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
111//!
112//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
113//! // `client_secret`, among other things.
114//! let secret: yup_oauth2::ApplicationSecret = Default::default();
115//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
116//! // unless you replace `None` with the desired Flow.
117//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
118//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
119//! // retrieve them from storage.
120//! let connector = hyper_rustls::HttpsConnectorBuilder::new()
121//! .with_native_roots()
122//! .unwrap()
123//! .https_only()
124//! .enable_http2()
125//! .build();
126//!
127//! let executor = hyper_util::rt::TokioExecutor::new();
128//! let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
129//! secret,
130//! yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
131//! yup_oauth2::client::CustomHyperClientBuilder::from(
132//! hyper_util::client::legacy::Client::builder(executor).build(connector),
133//! ),
134//! ).build().await.unwrap();
135//!
136//! let client = hyper_util::client::legacy::Client::builder(
137//! hyper_util::rt::TokioExecutor::new()
138//! )
139//! .build(
140//! hyper_rustls::HttpsConnectorBuilder::new()
141//! .with_native_roots()
142//! .unwrap()
143//! .https_or_http()
144//! .enable_http2()
145//! .build()
146//! );
147//! let mut hub = FirebaseHosting::new(client, auth);
148//! // As the method needs a request, you would usually fill it with the desired information
149//! // into the respective structure. Some of the parts shown here might not be applicable !
150//! // Values shown here are possibly random and not representative !
151//! let mut req = Site::default();
152//!
153//! // You can configure optional parameters by calling the respective setters at will, and
154//! // execute the final call using `doit()`.
155//! // Values shown here are possibly random and not representative !
156//! let result = hub.projects().sites_create(req, "parent")
157//! .validate_only(false)
158//! .site_id("amet.")
159//! .doit().await;
160//!
161//! match result {
162//! Err(e) => match e {
163//! // The Error enum provides details about what exactly happened.
164//! // You can also just use its `Debug`, `Display` or `Error` traits
165//! Error::HttpError(_)
166//! |Error::Io(_)
167//! |Error::MissingAPIKey
168//! |Error::MissingToken(_)
169//! |Error::Cancelled
170//! |Error::UploadSizeLimitExceeded(_, _)
171//! |Error::Failure(_)
172//! |Error::BadRequest(_)
173//! |Error::FieldClash(_)
174//! |Error::JsonDecodeError(_, _) => println!("{}", e),
175//! },
176//! Ok(res) => println!("Success: {:?}", res),
177//! }
178//! # }
179//! ```
180//! ## Handling Errors
181//!
182//! All errors produced by the system are provided either as [Result](common::Result) enumeration as return value of
183//! the doit() methods, or handed as possibly intermediate results to either the
184//! [Hub Delegate](common::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
185//!
186//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
187//! makes the system potentially resilient to all kinds of errors.
188//!
189//! ## Uploads and Downloads
190//! If a method supports downloads, the response body, which is part of the [Result](common::Result), should be
191//! read by you to obtain the media.
192//! If such a method also supports a [Response Result](common::ResponseResult), it will return that by default.
193//! 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
194//! this call: `.param("alt", "media")`.
195//!
196//! Methods supporting uploads can do so using up to 2 different protocols:
197//! *simple* and *resumable*. The distinctiveness of each is represented by customized
198//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
199//!
200//! ## Customization and Callbacks
201//!
202//! You may alter the way an `doit()` method is called by providing a [delegate](common::Delegate) to the
203//! [Method Builder](common::CallBuilder) before making the final `doit()` call.
204//! Respective methods will be called to provide progress information, as well as determine whether the system should
205//! retry on failure.
206//!
207//! The [delegate trait](common::Delegate) is default-implemented, allowing you to customize it with minimal effort.
208//!
209//! ## Optional Parts in Server-Requests
210//!
211//! All structures provided by this library are made to be [encodable](common::RequestValue) and
212//! [decodable](common::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
213//! are valid.
214//! Most optionals are are considered [Parts](common::Part) which are identifiable by name, which will be sent to
215//! the server to indicate either the set parts of the request or the desired parts in the response.
216//!
217//! ## Builder Arguments
218//!
219//! Using [method builders](common::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
220//! These will always take a single argument, for which the following statements are true.
221//!
222//! * [PODs][wiki-pod] are handed by copy
223//! * strings are passed as `&str`
224//! * [request values](common::RequestValue) are moved
225//!
226//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
227//!
228//! [wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure
229//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern
230//! [google-go-api]: https://github.com/google/google-api-go-client
231//!
232//! ## Cargo Features
233//!
234//! * `utoipa` - Add support for [utoipa](https://crates.io/crates/utoipa) and derive `utoipa::ToSchema` on all
235//! the types. You'll have to import and register the required types in `#[openapi(schemas(...))]`, otherwise the
236//! generated `openapi` spec would be invalid.
237//!
238//!
239//!
240
241// Unused attributes happen thanks to defined, but unused structures We don't
242// warn about this, as depending on the API, some data structures or facilities
243// are never used. Instead of pre-determining this, we just disable the lint.
244// It's manually tuned to not have any unused imports in fully featured APIs.
245// Same with unused_mut.
246#![allow(unused_imports, unused_mut, dead_code)]
247
248// DO NOT EDIT !
249// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
250// DO NOT EDIT !
251
252pub extern crate hyper;
253pub extern crate hyper_rustls;
254pub extern crate hyper_util;
255#[cfg(feature = "yup-oauth2")]
256pub extern crate yup_oauth2;
257
258pub extern crate google_apis_common as common;
259pub use common::{Delegate, Error, FieldMask, Result};
260
261pub mod api;
262pub use api::FirebaseHosting;