google_cloudidentity1/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 *Cloud Identity* crate version *7.0.0+20251216*, where *20251216* is the exact revision of the *cloudidentity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v7.0.0*.
6//!
7//! Everything else about the *Cloud Identity* *v1* API can be found at the
8//! [official documentation site](https://cloud.google.com/identity/).
9//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/cloudidentity1).
10//! # Features
11//!
12//! Handle the following *Resources* with ease from the central [hub](CloudIdentity) ...
13//!
14//! * customers
15//! * [*userinvitations cancel*](api::CustomerUserinvitationCancelCall), [*userinvitations get*](api::CustomerUserinvitationGetCall), [*userinvitations is invitable user*](api::CustomerUserinvitationIsInvitableUserCall), [*userinvitations list*](api::CustomerUserinvitationListCall) and [*userinvitations send*](api::CustomerUserinvitationSendCall)
16//! * devices
17//! * [*cancel wipe*](api::DeviceCancelWipeCall), [*create*](api::DeviceCreateCall), [*delete*](api::DeviceDeleteCall), [*device users approve*](api::DeviceDeviceUserApproveCall), [*device users block*](api::DeviceDeviceUserBlockCall), [*device users cancel wipe*](api::DeviceDeviceUserCancelWipeCall), [*device users client states get*](api::DeviceDeviceUserClientStateGetCall), [*device users client states list*](api::DeviceDeviceUserClientStateListCall), [*device users client states patch*](api::DeviceDeviceUserClientStatePatchCall), [*device users delete*](api::DeviceDeviceUserDeleteCall), [*device users get*](api::DeviceDeviceUserGetCall), [*device users list*](api::DeviceDeviceUserListCall), [*device users lookup*](api::DeviceDeviceUserLookupCall), [*device users wipe*](api::DeviceDeviceUserWipeCall), [*get*](api::DeviceGetCall), [*list*](api::DeviceListCall) and [*wipe*](api::DeviceWipeCall)
18//! * [groups](api::Group)
19//! * [*create*](api::GroupCreateCall), [*delete*](api::GroupDeleteCall), [*get*](api::GroupGetCall), [*get security settings*](api::GroupGetSecuritySettingCall), [*list*](api::GroupListCall), [*lookup*](api::GroupLookupCall), [*memberships check transitive membership*](api::GroupMembershipCheckTransitiveMembershipCall), [*memberships create*](api::GroupMembershipCreateCall), [*memberships delete*](api::GroupMembershipDeleteCall), [*memberships get*](api::GroupMembershipGetCall), [*memberships get membership graph*](api::GroupMembershipGetMembershipGraphCall), [*memberships list*](api::GroupMembershipListCall), [*memberships lookup*](api::GroupMembershipLookupCall), [*memberships modify membership roles*](api::GroupMembershipModifyMembershipRoleCall), [*memberships search direct groups*](api::GroupMembershipSearchDirectGroupCall), [*memberships search transitive groups*](api::GroupMembershipSearchTransitiveGroupCall), [*memberships search transitive memberships*](api::GroupMembershipSearchTransitiveMembershipCall), [*patch*](api::GroupPatchCall), [*search*](api::GroupSearchCall) and [*update security settings*](api::GroupUpdateSecuritySettingCall)
20//! * [inbound oidc sso profiles](api::InboundOidcSsoProfile)
21//! * [*create*](api::InboundOidcSsoProfileCreateCall), [*delete*](api::InboundOidcSsoProfileDeleteCall), [*get*](api::InboundOidcSsoProfileGetCall), [*list*](api::InboundOidcSsoProfileListCall) and [*patch*](api::InboundOidcSsoProfilePatchCall)
22//! * [inbound saml sso profiles](api::InboundSamlSsoProfile)
23//! * [*create*](api::InboundSamlSsoProfileCreateCall), [*delete*](api::InboundSamlSsoProfileDeleteCall), [*get*](api::InboundSamlSsoProfileGetCall), [*idp credentials add*](api::InboundSamlSsoProfileIdpCredentialAddCall), [*idp credentials delete*](api::InboundSamlSsoProfileIdpCredentialDeleteCall), [*idp credentials get*](api::InboundSamlSsoProfileIdpCredentialGetCall), [*idp credentials list*](api::InboundSamlSsoProfileIdpCredentialListCall), [*list*](api::InboundSamlSsoProfileListCall) and [*patch*](api::InboundSamlSsoProfilePatchCall)
24//! * [inbound sso assignments](api::InboundSsoAssignment)
25//! * [*create*](api::InboundSsoAssignmentCreateCall), [*delete*](api::InboundSsoAssignmentDeleteCall), [*get*](api::InboundSsoAssignmentGetCall), [*list*](api::InboundSsoAssignmentListCall) and [*patch*](api::InboundSsoAssignmentPatchCall)
26//! * [policies](api::Policy)
27//! * [*get*](api::PolicyGetCall) and [*list*](api::PolicyListCall)
28//!
29//!
30//!
31//!
32//! Not what you are looking for ? Find all other Google APIs in their Rust [documentation index](http://byron.github.io/google-apis-rs).
33//!
34//! # Structure of this Library
35//!
36//! The API is structured into the following primary items:
37//!
38//! * **[Hub](CloudIdentity)**
39//! * a central object to maintain state and allow accessing all *Activities*
40//! * creates [*Method Builders*](common::MethodsBuilder) which in turn
41//! allow access to individual [*Call Builders*](common::CallBuilder)
42//! * **[Resources](common::Resource)**
43//! * primary types that you can apply *Activities* to
44//! * a collection of properties and *Parts*
45//! * **[Parts](common::Part)**
46//! * a collection of properties
47//! * never directly used in *Activities*
48//! * **[Activities](common::CallBuilder)**
49//! * operations to apply to *Resources*
50//!
51//! All *structures* are marked with applicable traits to further categorize them and ease browsing.
52//!
53//! Generally speaking, you can invoke *Activities* like this:
54//!
55//! ```Rust,ignore
56//! let r = hub.resource().activity(...).doit().await
57//! ```
58//!
59//! Or specifically ...
60//!
61//! ```ignore
62//! let r = hub.customers().userinvitations_cancel(...).doit().await
63//! let r = hub.customers().userinvitations_send(...).doit().await
64//! let r = hub.devices().device_users_client_states_patch(...).doit().await
65//! let r = hub.devices().device_users_approve(...).doit().await
66//! let r = hub.devices().device_users_block(...).doit().await
67//! let r = hub.devices().device_users_cancel_wipe(...).doit().await
68//! let r = hub.devices().device_users_delete(...).doit().await
69//! let r = hub.devices().device_users_wipe(...).doit().await
70//! let r = hub.devices().cancel_wipe(...).doit().await
71//! let r = hub.devices().create(...).doit().await
72//! let r = hub.devices().delete(...).doit().await
73//! let r = hub.devices().wipe(...).doit().await
74//! let r = hub.groups().memberships_create(...).doit().await
75//! let r = hub.groups().memberships_delete(...).doit().await
76//! let r = hub.groups().memberships_get_membership_graph(...).doit().await
77//! let r = hub.groups().create(...).doit().await
78//! let r = hub.groups().delete(...).doit().await
79//! let r = hub.groups().patch(...).doit().await
80//! let r = hub.groups().update_security_settings(...).doit().await
81//! let r = hub.inbound_oidc_sso_profiles().create(...).doit().await
82//! let r = hub.inbound_oidc_sso_profiles().delete(...).doit().await
83//! let r = hub.inbound_oidc_sso_profiles().patch(...).doit().await
84//! let r = hub.inbound_saml_sso_profiles().idp_credentials_add(...).doit().await
85//! let r = hub.inbound_saml_sso_profiles().idp_credentials_delete(...).doit().await
86//! let r = hub.inbound_saml_sso_profiles().create(...).doit().await
87//! let r = hub.inbound_saml_sso_profiles().delete(...).doit().await
88//! let r = hub.inbound_saml_sso_profiles().patch(...).doit().await
89//! let r = hub.inbound_sso_assignments().create(...).doit().await
90//! let r = hub.inbound_sso_assignments().delete(...).doit().await
91//! let r = hub.inbound_sso_assignments().patch(...).doit().await
92//! ```
93//!
94//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
95//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
96//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
97//! The `doit()` method performs the actual communication with the server and returns the respective result.
98//!
99//! # Usage
100//!
101//! ## Setting up your Project
102//!
103//! To use this library, you would put the following lines into your `Cargo.toml` file:
104//!
105//! ```toml
106//! [dependencies]
107//! google-cloudidentity1 = "*"
108//! serde = "1"
109//! serde_json = "1"
110//! ```
111//!
112//! ## A complete example
113//!
114//! ```test_harness,no_run
115//! extern crate hyper;
116//! extern crate hyper_rustls;
117//! extern crate google_cloudidentity1 as cloudidentity1;
118//! use cloudidentity1::api::GoogleAppsCloudidentityDevicesV1ClientState;
119//! use cloudidentity1::{Result, Error};
120//! # async fn dox() {
121//! use cloudidentity1::{CloudIdentity, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
122//!
123//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
124//! // `client_secret`, among other things.
125//! let secret: yup_oauth2::ApplicationSecret = Default::default();
126//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
127//! // unless you replace `None` with the desired Flow.
128//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
129//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
130//! // retrieve them from storage.
131//! let connector = hyper_rustls::HttpsConnectorBuilder::new()
132//! .with_native_roots()
133//! .unwrap()
134//! .https_only()
135//! .enable_http2()
136//! .build();
137//!
138//! let executor = hyper_util::rt::TokioExecutor::new();
139//! let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
140//! secret,
141//! yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
142//! yup_oauth2::client::CustomHyperClientBuilder::from(
143//! hyper_util::client::legacy::Client::builder(executor).build(connector),
144//! ),
145//! ).build().await.unwrap();
146//!
147//! let client = hyper_util::client::legacy::Client::builder(
148//! hyper_util::rt::TokioExecutor::new()
149//! )
150//! .build(
151//! hyper_rustls::HttpsConnectorBuilder::new()
152//! .with_native_roots()
153//! .unwrap()
154//! .https_or_http()
155//! .enable_http2()
156//! .build()
157//! );
158//! let mut hub = CloudIdentity::new(client, auth);
159//! // As the method needs a request, you would usually fill it with the desired information
160//! // into the respective structure. Some of the parts shown here might not be applicable !
161//! // Values shown here are possibly random and not representative !
162//! let mut req = GoogleAppsCloudidentityDevicesV1ClientState::default();
163//!
164//! // You can configure optional parameters by calling the respective setters at will, and
165//! // execute the final call using `doit()`.
166//! // Values shown here are possibly random and not representative !
167//! let result = hub.devices().device_users_client_states_patch(req, "name")
168//! .update_mask(FieldMask::new::<&str>(&[]))
169//! .customer("ipsum")
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::CloudIdentity;