mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
make regen-apis
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
[package]
|
||||
|
||||
name = "google-accesscontextmanager1"
|
||||
version = "5.0.4+20240226"
|
||||
version = "5.0.5+20240417"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with Access Context Manager (protocol v1)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/accesscontextmanager1"
|
||||
homepage = "https://cloud.google.com/access-context-manager/docs/reference/rest/"
|
||||
documentation = "https://docs.rs/google-accesscontextmanager1/5.0.4+20240226"
|
||||
documentation = "https://docs.rs/google-accesscontextmanager1/5.0.5+20240417"
|
||||
license = "MIT"
|
||||
keywords = ["accesscontextmanager", "google", "protocol", "web", "api"]
|
||||
autobins = false
|
||||
@@ -18,12 +18,12 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "^ 1.0"
|
||||
hyper-rustls = "0.24.0"
|
||||
hyper-rustls = "0.25.0"
|
||||
mime = "^ 0.3.0"
|
||||
serde = { version = "^ 1.0", features = ["derive"] }
|
||||
serde_json = "^ 1.0"
|
||||
itertools = "^ 0.10"
|
||||
google-apis-common = { path = "../../google-apis-common", version = "6.0" }
|
||||
google-apis-common = { path = "../../google-apis-common", version = "6.0.3" }
|
||||
hyper = "^ 0.14"
|
||||
http = "^0.2"
|
||||
tokio = "^1.0"
|
||||
|
||||
@@ -6,7 +6,7 @@ DO NOT EDIT !
|
||||
The MIT License (MIT)
|
||||
=====================
|
||||
|
||||
Copyright © `2015-2020` `Sebastian Thiel`
|
||||
Copyright 2015–2024 Sebastian Thiel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
||||
@@ -5,22 +5,22 @@ DO NOT EDIT !
|
||||
-->
|
||||
The `google-accesscontextmanager1` library allows access to all features of the *Google Access Context Manager* service.
|
||||
|
||||
This documentation was generated from *Access Context Manager* crate version *5.0.4+20240226*, where *20240226* is the exact revision of the *accesscontextmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
|
||||
This documentation was generated from *Access Context Manager* crate version *5.0.5+20240417*, where *20240417* is the exact revision of the *accesscontextmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
|
||||
|
||||
Everything else about the *Access Context Manager* *v1* API can be found at the
|
||||
[official documentation site](https://cloud.google.com/access-context-manager/docs/reference/rest/).
|
||||
# Features
|
||||
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/AccessContextManager) ...
|
||||
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/AccessContextManager) ...
|
||||
|
||||
* [access policies](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicy)
|
||||
* [*access levels create*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAccessLevelCreateCall), [*access levels delete*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAccessLevelDeleteCall), [*access levels get*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAccessLevelGetCall), [*access levels list*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAccessLevelListCall), [*access levels patch*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAccessLevelPatchCall), [*access levels replace all*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAccessLevelReplaceAllCall), [*access levels test iam permissions*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAccessLevelTestIamPermissionCall), [*authorized orgs descs create*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescCreateCall), [*authorized orgs descs delete*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescDeleteCall), [*authorized orgs descs get*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescGetCall), [*authorized orgs descs list*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescListCall), [*authorized orgs descs patch*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescPatchCall), [*create*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyCreateCall), [*delete*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyDeleteCall), [*get*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyGetCall), [*get iam policy*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyGetIamPolicyCall), [*list*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyListCall), [*patch*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyPatchCall), [*service perimeters commit*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyServicePerimeterCommitCall), [*service perimeters create*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyServicePerimeterCreateCall), [*service perimeters delete*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyServicePerimeterDeleteCall), [*service perimeters get*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyServicePerimeterGetCall), [*service perimeters list*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyServicePerimeterListCall), [*service perimeters patch*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyServicePerimeterPatchCall), [*service perimeters replace all*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyServicePerimeterReplaceAllCall), [*service perimeters test iam permissions*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyServicePerimeterTestIamPermissionCall), [*set iam policy*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicySetIamPolicyCall) and [*test iam permissions*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::AccessPolicyTestIamPermissionCall)
|
||||
* [operations](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::Operation)
|
||||
* [*cancel*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OperationCancelCall), [*delete*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OperationDeleteCall), [*get*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OperationGetCall) and [*list*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OperationListCall)
|
||||
* [access policies](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicy)
|
||||
* [*access levels create*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAccessLevelCreateCall), [*access levels delete*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAccessLevelDeleteCall), [*access levels get*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAccessLevelGetCall), [*access levels list*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAccessLevelListCall), [*access levels patch*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAccessLevelPatchCall), [*access levels replace all*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAccessLevelReplaceAllCall), [*access levels test iam permissions*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAccessLevelTestIamPermissionCall), [*authorized orgs descs create*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescCreateCall), [*authorized orgs descs delete*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescDeleteCall), [*authorized orgs descs get*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescGetCall), [*authorized orgs descs list*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescListCall), [*authorized orgs descs patch*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyAuthorizedOrgsDescPatchCall), [*create*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyCreateCall), [*delete*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyDeleteCall), [*get*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyGetCall), [*get iam policy*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyGetIamPolicyCall), [*list*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyListCall), [*patch*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyPatchCall), [*service perimeters commit*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyServicePerimeterCommitCall), [*service perimeters create*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyServicePerimeterCreateCall), [*service perimeters delete*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyServicePerimeterDeleteCall), [*service perimeters get*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyServicePerimeterGetCall), [*service perimeters list*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyServicePerimeterListCall), [*service perimeters patch*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyServicePerimeterPatchCall), [*service perimeters replace all*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyServicePerimeterReplaceAllCall), [*service perimeters test iam permissions*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyServicePerimeterTestIamPermissionCall), [*set iam policy*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicySetIamPolicyCall) and [*test iam permissions*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::AccessPolicyTestIamPermissionCall)
|
||||
* [operations](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::Operation)
|
||||
* [*cancel*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OperationCancelCall), [*delete*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OperationDeleteCall), [*get*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OperationGetCall) and [*list*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OperationListCall)
|
||||
* organizations
|
||||
* [*gcp user access bindings create*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingCreateCall), [*gcp user access bindings delete*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingDeleteCall), [*gcp user access bindings get*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingGetCall), [*gcp user access bindings list*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingListCall) and [*gcp user access bindings patch*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingPatchCall)
|
||||
* [*gcp user access bindings create*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingCreateCall), [*gcp user access bindings delete*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingDeleteCall), [*gcp user access bindings get*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingGetCall), [*gcp user access bindings list*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingListCall) and [*gcp user access bindings patch*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::OrganizationGcpUserAccessBindingPatchCall)
|
||||
* services
|
||||
* [*get*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::ServiceGetCall) and [*list*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/api::ServiceListCall)
|
||||
* [*get*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::ServiceGetCall) and [*list*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/api::ServiceListCall)
|
||||
|
||||
|
||||
|
||||
@@ -29,17 +29,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r
|
||||
|
||||
The API is structured into the following primary items:
|
||||
|
||||
* **[Hub](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/AccessContextManager)**
|
||||
* **[Hub](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/AccessContextManager)**
|
||||
* a central object to maintain state and allow accessing all *Activities*
|
||||
* creates [*Method Builders*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::Resource)**
|
||||
* creates [*Method Builders*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::MethodsBuilder) which in turn
|
||||
allow access to individual [*Call Builders*](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::CallBuilder)
|
||||
* **[Resources](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::Resource)**
|
||||
* primary types that you can apply *Activities* to
|
||||
* a collection of properties and *Parts*
|
||||
* **[Parts](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::Part)**
|
||||
* **[Parts](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::Part)**
|
||||
* a collection of properties
|
||||
* never directly used in *Activities*
|
||||
* **[Activities](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::CallBuilder)**
|
||||
* **[Activities](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::CallBuilder)**
|
||||
* operations to apply to *Resources*
|
||||
|
||||
All *structures* are marked with applicable traits to further categorize them and ease browsing.
|
||||
@@ -77,8 +77,8 @@ let r = hub.organizations().gcp_user_access_bindings_delete(...).doit().await
|
||||
let r = hub.organizations().gcp_user_access_bindings_patch(...).doit().await
|
||||
```
|
||||
|
||||
The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
|
||||
The `doit()` method performs the actual communication with the server and returns the respective result.
|
||||
|
||||
@@ -102,22 +102,23 @@ extern crate hyper;
|
||||
extern crate hyper_rustls;
|
||||
extern crate google_accesscontextmanager1 as accesscontextmanager1;
|
||||
use accesscontextmanager1::{Result, Error};
|
||||
use accesscontextmanager1::api::enums::*;
|
||||
use std::default::Default;
|
||||
use accesscontextmanager1::{AccessContextManager, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
|
||||
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
// `client_secret`, among other things.
|
||||
let secret: oauth2::ApplicationSecret = Default::default();
|
||||
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
// unless you replace `None` with the desired Flow.
|
||||
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
// retrieve them from storage.
|
||||
let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
secret,
|
||||
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
).build().await.unwrap();
|
||||
let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
// You can configure optional parameters by calling the respective setters at will, and
|
||||
// execute the final call using `doit()`.
|
||||
// Values shown here are possibly random and not representative !
|
||||
@@ -148,49 +149,49 @@ match result {
|
||||
```
|
||||
## Handling Errors
|
||||
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::Result) enumeration as return value of
|
||||
the doit() methods, or handed as possibly intermediate results to either the
|
||||
[Hub Delegate](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
All errors produced by the system are provided either as [Result](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::Result) enumeration as return value of
|
||||
the doit() methods, or handed as possibly intermediate results to either the
|
||||
[Hub Delegate](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
|
||||
When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||||
When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||||
makes the system potentially resilient to all kinds of errors.
|
||||
|
||||
## Uploads and Downloads
|
||||
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::Result), should be
|
||||
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::Result), should be
|
||||
read by you to obtain the media.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::ResponseResult), it will return that by default.
|
||||
If such a method also supports a [Response Result](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::ResponseResult), it will return that by default.
|
||||
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
|
||||
this call: `.param("alt", "media")`.
|
||||
|
||||
Methods supporting uploads can do so using up to 2 different protocols:
|
||||
*simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
Methods supporting uploads can do so using up to 2 different protocols:
|
||||
*simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
`doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
|
||||
|
||||
## Customization and Callbacks
|
||||
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::CallBuilder) before making the final `doit()` call.
|
||||
Respective methods will be called to provide progress information, as well as determine whether the system should
|
||||
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::Delegate) to the
|
||||
[Method Builder](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::CallBuilder) before making the final `doit()` call.
|
||||
Respective methods will be called to provide progress information, as well as determine whether the system should
|
||||
retry on failure.
|
||||
|
||||
The [delegate trait](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
The [delegate trait](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
|
||||
## Optional Parts in Server-Requests
|
||||
|
||||
All structures provided by this library are made to be [encodable](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
All structures provided by this library are made to be [encodable](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::RequestValue) and
|
||||
[decodable](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
are valid.
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::Part) which are identifiable by name, which will be sent to
|
||||
Most optionals are are considered [Parts](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::Part) which are identifiable by name, which will be sent to
|
||||
the server to indicate either the set parts of the request or the desired parts in the response.
|
||||
|
||||
## Builder Arguments
|
||||
|
||||
Using [method builders](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
|
||||
Using [method builders](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
|
||||
These will always take a single argument, for which the following statements are true.
|
||||
|
||||
* [PODs][wiki-pod] are handed by copy
|
||||
* strings are passed as `&str`
|
||||
* [request values](https://docs.rs/google-accesscontextmanager1/5.0.4+20240226/google_accesscontextmanager1/client::RequestValue) are moved
|
||||
* [request values](https://docs.rs/google-accesscontextmanager1/5.0.5+20240417/google_accesscontextmanager1/client::RequestValue) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
@@ -199,7 +200,7 @@ Arguments will always be copied or cloned into the builder, to make them indepen
|
||||
[google-go-api]: https://github.com/google/google-api-go-client
|
||||
|
||||
# License
|
||||
The **accesscontextmanager1** library was generated by Sebastian Thiel, and is placed
|
||||
The **accesscontextmanager1** library was generated by Sebastian Thiel, and is placed
|
||||
under the *MIT* license.
|
||||
You can read the full text at the repository's [license file][repo-license].
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
929
gen/accesscontextmanager1/src/api/enums.rs
Normal file
929
gen/accesscontextmanager1/src/api/enums.rs
Normal file
@@ -0,0 +1,929 @@
|
||||
use super::*;
|
||||
|
||||
|
||||
|
||||
// region AuditLogConfigLogTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// The log type that this config enables.
|
||||
pub enum AuditLogConfigLogTypeEnum {
|
||||
|
||||
|
||||
/// Default case. Should never be this.
|
||||
///
|
||||
/// "LOG_TYPE_UNSPECIFIED"
|
||||
#[serde(rename="LOG_TYPE_UNSPECIFIED")]
|
||||
LOGTYPEUNSPECIFIED,
|
||||
|
||||
|
||||
/// Admin reads. Example: CloudIAM getIamPolicy
|
||||
///
|
||||
/// "ADMIN_READ"
|
||||
#[serde(rename="ADMIN_READ")]
|
||||
ADMINREAD,
|
||||
|
||||
|
||||
/// Data writes. Example: CloudSQL Users create
|
||||
///
|
||||
/// "DATA_WRITE"
|
||||
#[serde(rename="DATA_WRITE")]
|
||||
DATAWRITE,
|
||||
|
||||
|
||||
/// Data reads. Example: CloudSQL Users list
|
||||
///
|
||||
/// "DATA_READ"
|
||||
#[serde(rename="DATA_READ")]
|
||||
DATAREAD,
|
||||
}
|
||||
|
||||
impl AsRef<str> for AuditLogConfigLogTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
AuditLogConfigLogTypeEnum::LOGTYPEUNSPECIFIED => "LOG_TYPE_UNSPECIFIED",
|
||||
AuditLogConfigLogTypeEnum::ADMINREAD => "ADMIN_READ",
|
||||
AuditLogConfigLogTypeEnum::DATAWRITE => "DATA_WRITE",
|
||||
AuditLogConfigLogTypeEnum::DATAREAD => "DATA_READ",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for AuditLogConfigLogTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"LOG_TYPE_UNSPECIFIED" => Ok(AuditLogConfigLogTypeEnum::LOGTYPEUNSPECIFIED),
|
||||
"ADMIN_READ" => Ok(AuditLogConfigLogTypeEnum::ADMINREAD),
|
||||
"DATA_WRITE" => Ok(AuditLogConfigLogTypeEnum::DATAWRITE),
|
||||
"DATA_READ" => Ok(AuditLogConfigLogTypeEnum::DATAREAD),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AuditLogConfigLogTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region AuthorizedOrgsDescAssetTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// The asset type of this authorized orgs desc. Valid values are `ASSET_TYPE_DEVICE`, and `ASSET_TYPE_CREDENTIAL_STRENGTH`.
|
||||
pub enum AuthorizedOrgsDescAssetTypeEnum {
|
||||
|
||||
|
||||
/// No asset type specified.
|
||||
///
|
||||
/// "ASSET_TYPE_UNSPECIFIED"
|
||||
#[serde(rename="ASSET_TYPE_UNSPECIFIED")]
|
||||
ASSETTYPEUNSPECIFIED,
|
||||
|
||||
|
||||
/// Device asset type.
|
||||
///
|
||||
/// "ASSET_TYPE_DEVICE"
|
||||
#[serde(rename="ASSET_TYPE_DEVICE")]
|
||||
ASSETTYPEDEVICE,
|
||||
|
||||
|
||||
/// Credential strength asset type.
|
||||
///
|
||||
/// "ASSET_TYPE_CREDENTIAL_STRENGTH"
|
||||
#[serde(rename="ASSET_TYPE_CREDENTIAL_STRENGTH")]
|
||||
ASSETTYPECREDENTIALSTRENGTH,
|
||||
}
|
||||
|
||||
impl AsRef<str> for AuthorizedOrgsDescAssetTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
AuthorizedOrgsDescAssetTypeEnum::ASSETTYPEUNSPECIFIED => "ASSET_TYPE_UNSPECIFIED",
|
||||
AuthorizedOrgsDescAssetTypeEnum::ASSETTYPEDEVICE => "ASSET_TYPE_DEVICE",
|
||||
AuthorizedOrgsDescAssetTypeEnum::ASSETTYPECREDENTIALSTRENGTH => "ASSET_TYPE_CREDENTIAL_STRENGTH",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for AuthorizedOrgsDescAssetTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"ASSET_TYPE_UNSPECIFIED" => Ok(AuthorizedOrgsDescAssetTypeEnum::ASSETTYPEUNSPECIFIED),
|
||||
"ASSET_TYPE_DEVICE" => Ok(AuthorizedOrgsDescAssetTypeEnum::ASSETTYPEDEVICE),
|
||||
"ASSET_TYPE_CREDENTIAL_STRENGTH" => Ok(AuthorizedOrgsDescAssetTypeEnum::ASSETTYPECREDENTIALSTRENGTH),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AuthorizedOrgsDescAssetTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region AuthorizedOrgsDescAuthorizationDirectionEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// The direction of the authorization relationship between this organization and the organizations listed in the `orgs` field. The valid values for this field include the following: `AUTHORIZATION_DIRECTION_FROM`: Allows this organization to evaluate traffic in the organizations listed in the `orgs` field. `AUTHORIZATION_DIRECTION_TO`: Allows the organizations listed in the `orgs` field to evaluate the traffic in this organization. For the authorization relationship to take effect, all of the organizations must authorize and specify the appropriate relationship direction. For example, if organization A authorized organization B and C to evaluate its traffic, by specifying `AUTHORIZATION_DIRECTION_TO` as the authorization direction, organizations B and C must specify `AUTHORIZATION_DIRECTION_FROM` as the authorization direction in their `AuthorizedOrgsDesc` resource.
|
||||
pub enum AuthorizedOrgsDescAuthorizationDirectionEnum {
|
||||
|
||||
|
||||
/// No direction specified.
|
||||
///
|
||||
/// "AUTHORIZATION_DIRECTION_UNSPECIFIED"
|
||||
#[serde(rename="AUTHORIZATION_DIRECTION_UNSPECIFIED")]
|
||||
AUTHORIZATIONDIRECTIONUNSPECIFIED,
|
||||
|
||||
|
||||
/// The specified organizations are authorized to evaluate traffic in this organization.
|
||||
///
|
||||
/// "AUTHORIZATION_DIRECTION_TO"
|
||||
#[serde(rename="AUTHORIZATION_DIRECTION_TO")]
|
||||
AUTHORIZATIONDIRECTIONTO,
|
||||
|
||||
|
||||
/// The traffic of the specified organizations can be evaluated by this organization.
|
||||
///
|
||||
/// "AUTHORIZATION_DIRECTION_FROM"
|
||||
#[serde(rename="AUTHORIZATION_DIRECTION_FROM")]
|
||||
AUTHORIZATIONDIRECTIONFROM,
|
||||
}
|
||||
|
||||
impl AsRef<str> for AuthorizedOrgsDescAuthorizationDirectionEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
AuthorizedOrgsDescAuthorizationDirectionEnum::AUTHORIZATIONDIRECTIONUNSPECIFIED => "AUTHORIZATION_DIRECTION_UNSPECIFIED",
|
||||
AuthorizedOrgsDescAuthorizationDirectionEnum::AUTHORIZATIONDIRECTIONTO => "AUTHORIZATION_DIRECTION_TO",
|
||||
AuthorizedOrgsDescAuthorizationDirectionEnum::AUTHORIZATIONDIRECTIONFROM => "AUTHORIZATION_DIRECTION_FROM",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for AuthorizedOrgsDescAuthorizationDirectionEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"AUTHORIZATION_DIRECTION_UNSPECIFIED" => Ok(AuthorizedOrgsDescAuthorizationDirectionEnum::AUTHORIZATIONDIRECTIONUNSPECIFIED),
|
||||
"AUTHORIZATION_DIRECTION_TO" => Ok(AuthorizedOrgsDescAuthorizationDirectionEnum::AUTHORIZATIONDIRECTIONTO),
|
||||
"AUTHORIZATION_DIRECTION_FROM" => Ok(AuthorizedOrgsDescAuthorizationDirectionEnum::AUTHORIZATIONDIRECTIONFROM),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AuthorizedOrgsDescAuthorizationDirectionEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region AuthorizedOrgsDescAuthorizationTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// A granular control type for authorization levels. Valid value is `AUTHORIZATION_TYPE_TRUST`.
|
||||
pub enum AuthorizedOrgsDescAuthorizationTypeEnum {
|
||||
|
||||
|
||||
/// No authorization type specified.
|
||||
///
|
||||
/// "AUTHORIZATION_TYPE_UNSPECIFIED"
|
||||
#[serde(rename="AUTHORIZATION_TYPE_UNSPECIFIED")]
|
||||
AUTHORIZATIONTYPEUNSPECIFIED,
|
||||
|
||||
|
||||
/// This authorization relationship is "trust".
|
||||
///
|
||||
/// "AUTHORIZATION_TYPE_TRUST"
|
||||
#[serde(rename="AUTHORIZATION_TYPE_TRUST")]
|
||||
AUTHORIZATIONTYPETRUST,
|
||||
}
|
||||
|
||||
impl AsRef<str> for AuthorizedOrgsDescAuthorizationTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
AuthorizedOrgsDescAuthorizationTypeEnum::AUTHORIZATIONTYPEUNSPECIFIED => "AUTHORIZATION_TYPE_UNSPECIFIED",
|
||||
AuthorizedOrgsDescAuthorizationTypeEnum::AUTHORIZATIONTYPETRUST => "AUTHORIZATION_TYPE_TRUST",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for AuthorizedOrgsDescAuthorizationTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"AUTHORIZATION_TYPE_UNSPECIFIED" => Ok(AuthorizedOrgsDescAuthorizationTypeEnum::AUTHORIZATIONTYPEUNSPECIFIED),
|
||||
"AUTHORIZATION_TYPE_TRUST" => Ok(AuthorizedOrgsDescAuthorizationTypeEnum::AUTHORIZATIONTYPETRUST),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AuthorizedOrgsDescAuthorizationTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region BasicLevelCombiningFunctionEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// How the `conditions` list should be combined to determine if a request is granted this `AccessLevel`. If AND is used, each `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. If OR is used, at least one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. Default behavior is AND.
|
||||
pub enum BasicLevelCombiningFunctionEnum {
|
||||
|
||||
|
||||
/// All `Conditions` must be true for the `BasicLevel` to be true.
|
||||
///
|
||||
/// "AND"
|
||||
#[serde(rename="AND")]
|
||||
AND,
|
||||
|
||||
|
||||
/// If at least one `Condition` is true, then the `BasicLevel` is true.
|
||||
///
|
||||
/// "OR"
|
||||
#[serde(rename="OR")]
|
||||
OR,
|
||||
}
|
||||
|
||||
impl AsRef<str> for BasicLevelCombiningFunctionEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
BasicLevelCombiningFunctionEnum::AND => "AND",
|
||||
BasicLevelCombiningFunctionEnum::OR => "OR",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for BasicLevelCombiningFunctionEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"AND" => Ok(BasicLevelCombiningFunctionEnum::AND),
|
||||
"OR" => Ok(BasicLevelCombiningFunctionEnum::OR),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a BasicLevelCombiningFunctionEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region DevicePolicyAllowedDeviceManagementLevelsEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Allowed device management levels, an empty list allows all management levels.
|
||||
pub enum DevicePolicyAllowedDeviceManagementLevelsEnum {
|
||||
|
||||
|
||||
/// The device's management level is not specified or not known.
|
||||
///
|
||||
/// "MANAGEMENT_UNSPECIFIED"
|
||||
#[serde(rename="MANAGEMENT_UNSPECIFIED")]
|
||||
MANAGEMENTUNSPECIFIED,
|
||||
|
||||
|
||||
/// The device is not managed.
|
||||
///
|
||||
/// "NONE"
|
||||
#[serde(rename="NONE")]
|
||||
NONE,
|
||||
|
||||
|
||||
/// Basic management is enabled, which is generally limited to monitoring and wiping the corporate account.
|
||||
///
|
||||
/// "BASIC"
|
||||
#[serde(rename="BASIC")]
|
||||
BASIC,
|
||||
|
||||
|
||||
/// Complete device management. This includes more thorough monitoring and the ability to directly manage the device (such as remote wiping). This can be enabled through the Android Enterprise Platform.
|
||||
///
|
||||
/// "COMPLETE"
|
||||
#[serde(rename="COMPLETE")]
|
||||
COMPLETE,
|
||||
}
|
||||
|
||||
impl AsRef<str> for DevicePolicyAllowedDeviceManagementLevelsEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
DevicePolicyAllowedDeviceManagementLevelsEnum::MANAGEMENTUNSPECIFIED => "MANAGEMENT_UNSPECIFIED",
|
||||
DevicePolicyAllowedDeviceManagementLevelsEnum::NONE => "NONE",
|
||||
DevicePolicyAllowedDeviceManagementLevelsEnum::BASIC => "BASIC",
|
||||
DevicePolicyAllowedDeviceManagementLevelsEnum::COMPLETE => "COMPLETE",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for DevicePolicyAllowedDeviceManagementLevelsEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"MANAGEMENT_UNSPECIFIED" => Ok(DevicePolicyAllowedDeviceManagementLevelsEnum::MANAGEMENTUNSPECIFIED),
|
||||
"NONE" => Ok(DevicePolicyAllowedDeviceManagementLevelsEnum::NONE),
|
||||
"BASIC" => Ok(DevicePolicyAllowedDeviceManagementLevelsEnum::BASIC),
|
||||
"COMPLETE" => Ok(DevicePolicyAllowedDeviceManagementLevelsEnum::COMPLETE),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a DevicePolicyAllowedDeviceManagementLevelsEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region DevicePolicyAllowedEncryptionStatusesEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Allowed encryptions statuses, an empty list allows all statuses.
|
||||
pub enum DevicePolicyAllowedEncryptionStatusesEnum {
|
||||
|
||||
|
||||
/// The encryption status of the device is not specified or not known.
|
||||
///
|
||||
/// "ENCRYPTION_UNSPECIFIED"
|
||||
#[serde(rename="ENCRYPTION_UNSPECIFIED")]
|
||||
ENCRYPTIONUNSPECIFIED,
|
||||
|
||||
|
||||
/// The device does not support encryption.
|
||||
///
|
||||
/// "ENCRYPTION_UNSUPPORTED"
|
||||
#[serde(rename="ENCRYPTION_UNSUPPORTED")]
|
||||
ENCRYPTIONUNSUPPORTED,
|
||||
|
||||
|
||||
/// The device supports encryption, but is currently unencrypted.
|
||||
///
|
||||
/// "UNENCRYPTED"
|
||||
#[serde(rename="UNENCRYPTED")]
|
||||
UNENCRYPTED,
|
||||
|
||||
|
||||
/// The device is encrypted.
|
||||
///
|
||||
/// "ENCRYPTED"
|
||||
#[serde(rename="ENCRYPTED")]
|
||||
ENCRYPTED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for DevicePolicyAllowedEncryptionStatusesEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
DevicePolicyAllowedEncryptionStatusesEnum::ENCRYPTIONUNSPECIFIED => "ENCRYPTION_UNSPECIFIED",
|
||||
DevicePolicyAllowedEncryptionStatusesEnum::ENCRYPTIONUNSUPPORTED => "ENCRYPTION_UNSUPPORTED",
|
||||
DevicePolicyAllowedEncryptionStatusesEnum::UNENCRYPTED => "UNENCRYPTED",
|
||||
DevicePolicyAllowedEncryptionStatusesEnum::ENCRYPTED => "ENCRYPTED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for DevicePolicyAllowedEncryptionStatusesEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"ENCRYPTION_UNSPECIFIED" => Ok(DevicePolicyAllowedEncryptionStatusesEnum::ENCRYPTIONUNSPECIFIED),
|
||||
"ENCRYPTION_UNSUPPORTED" => Ok(DevicePolicyAllowedEncryptionStatusesEnum::ENCRYPTIONUNSUPPORTED),
|
||||
"UNENCRYPTED" => Ok(DevicePolicyAllowedEncryptionStatusesEnum::UNENCRYPTED),
|
||||
"ENCRYPTED" => Ok(DevicePolicyAllowedEncryptionStatusesEnum::ENCRYPTED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a DevicePolicyAllowedEncryptionStatusesEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region EgressFromIdentityTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Specifies the type of identities that are allowed access to outside the perimeter. If left unspecified, then members of `identities` field will be allowed access.
|
||||
pub enum EgressFromIdentityTypeEnum {
|
||||
|
||||
|
||||
/// No blanket identity group specified.
|
||||
///
|
||||
/// "IDENTITY_TYPE_UNSPECIFIED"
|
||||
#[serde(rename="IDENTITY_TYPE_UNSPECIFIED")]
|
||||
IDENTITYTYPEUNSPECIFIED,
|
||||
|
||||
|
||||
/// Authorize access from all identities outside the perimeter.
|
||||
///
|
||||
/// "ANY_IDENTITY"
|
||||
#[serde(rename="ANY_IDENTITY")]
|
||||
ANYIDENTITY,
|
||||
|
||||
|
||||
/// Authorize access from all human users outside the perimeter.
|
||||
///
|
||||
/// "ANY_USER_ACCOUNT"
|
||||
#[serde(rename="ANY_USER_ACCOUNT")]
|
||||
ANYUSERACCOUNT,
|
||||
|
||||
|
||||
/// Authorize access from all service accounts outside the perimeter.
|
||||
///
|
||||
/// "ANY_SERVICE_ACCOUNT"
|
||||
#[serde(rename="ANY_SERVICE_ACCOUNT")]
|
||||
ANYSERVICEACCOUNT,
|
||||
}
|
||||
|
||||
impl AsRef<str> for EgressFromIdentityTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
EgressFromIdentityTypeEnum::IDENTITYTYPEUNSPECIFIED => "IDENTITY_TYPE_UNSPECIFIED",
|
||||
EgressFromIdentityTypeEnum::ANYIDENTITY => "ANY_IDENTITY",
|
||||
EgressFromIdentityTypeEnum::ANYUSERACCOUNT => "ANY_USER_ACCOUNT",
|
||||
EgressFromIdentityTypeEnum::ANYSERVICEACCOUNT => "ANY_SERVICE_ACCOUNT",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for EgressFromIdentityTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"IDENTITY_TYPE_UNSPECIFIED" => Ok(EgressFromIdentityTypeEnum::IDENTITYTYPEUNSPECIFIED),
|
||||
"ANY_IDENTITY" => Ok(EgressFromIdentityTypeEnum::ANYIDENTITY),
|
||||
"ANY_USER_ACCOUNT" => Ok(EgressFromIdentityTypeEnum::ANYUSERACCOUNT),
|
||||
"ANY_SERVICE_ACCOUNT" => Ok(EgressFromIdentityTypeEnum::ANYSERVICEACCOUNT),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a EgressFromIdentityTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region EgressFromSourceRestrictionEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Whether to enforce traffic restrictions based on `sources` field. If the `sources` fields is non-empty, then this field must be set to `SOURCE_RESTRICTION_ENABLED`.
|
||||
pub enum EgressFromSourceRestrictionEnum {
|
||||
|
||||
|
||||
/// Enforcement preference unspecified, will not enforce traffic restrictions based on `sources` in EgressFrom.
|
||||
///
|
||||
/// "SOURCE_RESTRICTION_UNSPECIFIED"
|
||||
#[serde(rename="SOURCE_RESTRICTION_UNSPECIFIED")]
|
||||
SOURCERESTRICTIONUNSPECIFIED,
|
||||
|
||||
|
||||
/// Enforcement preference enabled, traffic restrictions will be enforced based on `sources` in EgressFrom.
|
||||
///
|
||||
/// "SOURCE_RESTRICTION_ENABLED"
|
||||
#[serde(rename="SOURCE_RESTRICTION_ENABLED")]
|
||||
SOURCERESTRICTIONENABLED,
|
||||
|
||||
|
||||
/// Enforcement preference disabled, will not enforce traffic restrictions based on `sources` in EgressFrom.
|
||||
///
|
||||
/// "SOURCE_RESTRICTION_DISABLED"
|
||||
#[serde(rename="SOURCE_RESTRICTION_DISABLED")]
|
||||
SOURCERESTRICTIONDISABLED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for EgressFromSourceRestrictionEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
EgressFromSourceRestrictionEnum::SOURCERESTRICTIONUNSPECIFIED => "SOURCE_RESTRICTION_UNSPECIFIED",
|
||||
EgressFromSourceRestrictionEnum::SOURCERESTRICTIONENABLED => "SOURCE_RESTRICTION_ENABLED",
|
||||
EgressFromSourceRestrictionEnum::SOURCERESTRICTIONDISABLED => "SOURCE_RESTRICTION_DISABLED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for EgressFromSourceRestrictionEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"SOURCE_RESTRICTION_UNSPECIFIED" => Ok(EgressFromSourceRestrictionEnum::SOURCERESTRICTIONUNSPECIFIED),
|
||||
"SOURCE_RESTRICTION_ENABLED" => Ok(EgressFromSourceRestrictionEnum::SOURCERESTRICTIONENABLED),
|
||||
"SOURCE_RESTRICTION_DISABLED" => Ok(EgressFromSourceRestrictionEnum::SOURCERESTRICTIONDISABLED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a EgressFromSourceRestrictionEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region IngressFromIdentityTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of `identities` field will be allowed access.
|
||||
pub enum IngressFromIdentityTypeEnum {
|
||||
|
||||
|
||||
/// No blanket identity group specified.
|
||||
///
|
||||
/// "IDENTITY_TYPE_UNSPECIFIED"
|
||||
#[serde(rename="IDENTITY_TYPE_UNSPECIFIED")]
|
||||
IDENTITYTYPEUNSPECIFIED,
|
||||
|
||||
|
||||
/// Authorize access from all identities outside the perimeter.
|
||||
///
|
||||
/// "ANY_IDENTITY"
|
||||
#[serde(rename="ANY_IDENTITY")]
|
||||
ANYIDENTITY,
|
||||
|
||||
|
||||
/// Authorize access from all human users outside the perimeter.
|
||||
///
|
||||
/// "ANY_USER_ACCOUNT"
|
||||
#[serde(rename="ANY_USER_ACCOUNT")]
|
||||
ANYUSERACCOUNT,
|
||||
|
||||
|
||||
/// Authorize access from all service accounts outside the perimeter.
|
||||
///
|
||||
/// "ANY_SERVICE_ACCOUNT"
|
||||
#[serde(rename="ANY_SERVICE_ACCOUNT")]
|
||||
ANYSERVICEACCOUNT,
|
||||
}
|
||||
|
||||
impl AsRef<str> for IngressFromIdentityTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
IngressFromIdentityTypeEnum::IDENTITYTYPEUNSPECIFIED => "IDENTITY_TYPE_UNSPECIFIED",
|
||||
IngressFromIdentityTypeEnum::ANYIDENTITY => "ANY_IDENTITY",
|
||||
IngressFromIdentityTypeEnum::ANYUSERACCOUNT => "ANY_USER_ACCOUNT",
|
||||
IngressFromIdentityTypeEnum::ANYSERVICEACCOUNT => "ANY_SERVICE_ACCOUNT",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for IngressFromIdentityTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"IDENTITY_TYPE_UNSPECIFIED" => Ok(IngressFromIdentityTypeEnum::IDENTITYTYPEUNSPECIFIED),
|
||||
"ANY_IDENTITY" => Ok(IngressFromIdentityTypeEnum::ANYIDENTITY),
|
||||
"ANY_USER_ACCOUNT" => Ok(IngressFromIdentityTypeEnum::ANYUSERACCOUNT),
|
||||
"ANY_SERVICE_ACCOUNT" => Ok(IngressFromIdentityTypeEnum::ANYSERVICEACCOUNT),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a IngressFromIdentityTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region OsConstraintOsTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Required. The allowed OS type.
|
||||
pub enum OsConstraintOsTypeEnum {
|
||||
|
||||
|
||||
/// The operating system of the device is not specified or not known.
|
||||
///
|
||||
/// "OS_UNSPECIFIED"
|
||||
#[serde(rename="OS_UNSPECIFIED")]
|
||||
OSUNSPECIFIED,
|
||||
|
||||
|
||||
/// A desktop Mac operating system.
|
||||
///
|
||||
/// "DESKTOP_MAC"
|
||||
#[serde(rename="DESKTOP_MAC")]
|
||||
DESKTOPMAC,
|
||||
|
||||
|
||||
/// A desktop Windows operating system.
|
||||
///
|
||||
/// "DESKTOP_WINDOWS"
|
||||
#[serde(rename="DESKTOP_WINDOWS")]
|
||||
DESKTOPWINDOWS,
|
||||
|
||||
|
||||
/// A desktop Linux operating system.
|
||||
///
|
||||
/// "DESKTOP_LINUX"
|
||||
#[serde(rename="DESKTOP_LINUX")]
|
||||
DESKTOPLINUX,
|
||||
|
||||
|
||||
/// A desktop ChromeOS operating system.
|
||||
///
|
||||
/// "DESKTOP_CHROME_OS"
|
||||
#[serde(rename="DESKTOP_CHROME_OS")]
|
||||
DESKTOPCHROMEOS,
|
||||
|
||||
|
||||
/// An Android operating system.
|
||||
///
|
||||
/// "ANDROID"
|
||||
#[serde(rename="ANDROID")]
|
||||
ANDROID,
|
||||
|
||||
|
||||
/// An iOS operating system.
|
||||
///
|
||||
/// "IOS"
|
||||
#[serde(rename="IOS")]
|
||||
IOS,
|
||||
}
|
||||
|
||||
impl AsRef<str> for OsConstraintOsTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
OsConstraintOsTypeEnum::OSUNSPECIFIED => "OS_UNSPECIFIED",
|
||||
OsConstraintOsTypeEnum::DESKTOPMAC => "DESKTOP_MAC",
|
||||
OsConstraintOsTypeEnum::DESKTOPWINDOWS => "DESKTOP_WINDOWS",
|
||||
OsConstraintOsTypeEnum::DESKTOPLINUX => "DESKTOP_LINUX",
|
||||
OsConstraintOsTypeEnum::DESKTOPCHROMEOS => "DESKTOP_CHROME_OS",
|
||||
OsConstraintOsTypeEnum::ANDROID => "ANDROID",
|
||||
OsConstraintOsTypeEnum::IOS => "IOS",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for OsConstraintOsTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"OS_UNSPECIFIED" => Ok(OsConstraintOsTypeEnum::OSUNSPECIFIED),
|
||||
"DESKTOP_MAC" => Ok(OsConstraintOsTypeEnum::DESKTOPMAC),
|
||||
"DESKTOP_WINDOWS" => Ok(OsConstraintOsTypeEnum::DESKTOPWINDOWS),
|
||||
"DESKTOP_LINUX" => Ok(OsConstraintOsTypeEnum::DESKTOPLINUX),
|
||||
"DESKTOP_CHROME_OS" => Ok(OsConstraintOsTypeEnum::DESKTOPCHROMEOS),
|
||||
"ANDROID" => Ok(OsConstraintOsTypeEnum::ANDROID),
|
||||
"IOS" => Ok(OsConstraintOsTypeEnum::IOS),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a OsConstraintOsTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region ServicePerimeterPerimeterTypeEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Perimeter type indicator. A single project or VPC network is allowed to be a member of single regular perimeter, but multiple service perimeter bridges. A project cannot be a included in a perimeter bridge without being included in regular perimeter. For perimeter bridges, the restricted service list as well as access level lists must be empty.
|
||||
pub enum ServicePerimeterPerimeterTypeEnum {
|
||||
|
||||
|
||||
/// Regular Perimeter. When no value is specified, the perimeter uses this type.
|
||||
///
|
||||
/// "PERIMETER_TYPE_REGULAR"
|
||||
#[serde(rename="PERIMETER_TYPE_REGULAR")]
|
||||
PERIMETERTYPEREGULAR,
|
||||
|
||||
|
||||
/// Perimeter Bridge.
|
||||
///
|
||||
/// "PERIMETER_TYPE_BRIDGE"
|
||||
#[serde(rename="PERIMETER_TYPE_BRIDGE")]
|
||||
PERIMETERTYPEBRIDGE,
|
||||
}
|
||||
|
||||
impl AsRef<str> for ServicePerimeterPerimeterTypeEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
ServicePerimeterPerimeterTypeEnum::PERIMETERTYPEREGULAR => "PERIMETER_TYPE_REGULAR",
|
||||
ServicePerimeterPerimeterTypeEnum::PERIMETERTYPEBRIDGE => "PERIMETER_TYPE_BRIDGE",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for ServicePerimeterPerimeterTypeEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"PERIMETER_TYPE_REGULAR" => Ok(ServicePerimeterPerimeterTypeEnum::PERIMETERTYPEREGULAR),
|
||||
"PERIMETER_TYPE_BRIDGE" => Ok(ServicePerimeterPerimeterTypeEnum::PERIMETERTYPEBRIDGE),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ServicePerimeterPerimeterTypeEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region SupportedServiceSupportStageEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// The support stage of the service.
|
||||
pub enum SupportedServiceSupportStageEnum {
|
||||
|
||||
|
||||
/// Do not use this default value.
|
||||
///
|
||||
/// "LAUNCH_STAGE_UNSPECIFIED"
|
||||
#[serde(rename="LAUNCH_STAGE_UNSPECIFIED")]
|
||||
LAUNCHSTAGEUNSPECIFIED,
|
||||
|
||||
|
||||
/// The feature is not yet implemented. Users can not use it.
|
||||
///
|
||||
/// "UNIMPLEMENTED"
|
||||
#[serde(rename="UNIMPLEMENTED")]
|
||||
UNIMPLEMENTED,
|
||||
|
||||
|
||||
/// Prelaunch features are hidden from users and are only visible internally.
|
||||
///
|
||||
/// "PRELAUNCH"
|
||||
#[serde(rename="PRELAUNCH")]
|
||||
PRELAUNCH,
|
||||
|
||||
|
||||
/// Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.
|
||||
///
|
||||
/// "EARLY_ACCESS"
|
||||
#[serde(rename="EARLY_ACCESS")]
|
||||
EARLYACCESS,
|
||||
|
||||
|
||||
/// Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.
|
||||
///
|
||||
/// "ALPHA"
|
||||
#[serde(rename="ALPHA")]
|
||||
ALPHA,
|
||||
|
||||
|
||||
/// Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.
|
||||
///
|
||||
/// "BETA"
|
||||
#[serde(rename="BETA")]
|
||||
BETA,
|
||||
|
||||
|
||||
/// GA features are open to all developers and are considered stable and fully qualified for production use.
|
||||
///
|
||||
/// "GA"
|
||||
#[serde(rename="GA")]
|
||||
GA,
|
||||
|
||||
|
||||
/// Deprecated features are scheduled to be shut down and removed. For more information, see the "Deprecation Policy" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation.
|
||||
///
|
||||
/// "DEPRECATED"
|
||||
#[serde(rename="DEPRECATED")]
|
||||
DEPRECATED,
|
||||
}
|
||||
|
||||
impl AsRef<str> for SupportedServiceSupportStageEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
SupportedServiceSupportStageEnum::LAUNCHSTAGEUNSPECIFIED => "LAUNCH_STAGE_UNSPECIFIED",
|
||||
SupportedServiceSupportStageEnum::UNIMPLEMENTED => "UNIMPLEMENTED",
|
||||
SupportedServiceSupportStageEnum::PRELAUNCH => "PRELAUNCH",
|
||||
SupportedServiceSupportStageEnum::EARLYACCESS => "EARLY_ACCESS",
|
||||
SupportedServiceSupportStageEnum::ALPHA => "ALPHA",
|
||||
SupportedServiceSupportStageEnum::BETA => "BETA",
|
||||
SupportedServiceSupportStageEnum::GA => "GA",
|
||||
SupportedServiceSupportStageEnum::DEPRECATED => "DEPRECATED",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for SupportedServiceSupportStageEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"LAUNCH_STAGE_UNSPECIFIED" => Ok(SupportedServiceSupportStageEnum::LAUNCHSTAGEUNSPECIFIED),
|
||||
"UNIMPLEMENTED" => Ok(SupportedServiceSupportStageEnum::UNIMPLEMENTED),
|
||||
"PRELAUNCH" => Ok(SupportedServiceSupportStageEnum::PRELAUNCH),
|
||||
"EARLY_ACCESS" => Ok(SupportedServiceSupportStageEnum::EARLYACCESS),
|
||||
"ALPHA" => Ok(SupportedServiceSupportStageEnum::ALPHA),
|
||||
"BETA" => Ok(SupportedServiceSupportStageEnum::BETA),
|
||||
"GA" => Ok(SupportedServiceSupportStageEnum::GA),
|
||||
"DEPRECATED" => Ok(SupportedServiceSupportStageEnum::DEPRECATED),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a SupportedServiceSupportStageEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
// region AccessPolicyAccessLevelFormatEnum
|
||||
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
|
||||
/// Whether to return `BasicLevels` in the Cloud Common Expression language, as `CustomLevels`, rather than as `BasicLevels`. Defaults to returning `AccessLevels` in the format they were defined.
|
||||
pub enum AccessPolicyAccessLevelFormatEnum {
|
||||
|
||||
|
||||
/// The format was not specified.
|
||||
///
|
||||
/// "LEVEL_FORMAT_UNSPECIFIED"
|
||||
#[serde(rename="LEVEL_FORMAT_UNSPECIFIED")]
|
||||
LEVELFORMATUNSPECIFIED,
|
||||
|
||||
|
||||
/// Uses the format the resource was defined in. BasicLevels are returned as BasicLevels, CustomLevels are returned as CustomLevels.
|
||||
///
|
||||
/// "AS_DEFINED"
|
||||
#[serde(rename="AS_DEFINED")]
|
||||
ASDEFINED,
|
||||
|
||||
|
||||
/// Use Cloud Common Expression Language when returning the resource. Both BasicLevels and CustomLevels are returned as CustomLevels.
|
||||
///
|
||||
/// "CEL"
|
||||
#[serde(rename="CEL")]
|
||||
CEL,
|
||||
}
|
||||
|
||||
impl AsRef<str> for AccessPolicyAccessLevelFormatEnum {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
AccessPolicyAccessLevelFormatEnum::LEVELFORMATUNSPECIFIED => "LEVEL_FORMAT_UNSPECIFIED",
|
||||
AccessPolicyAccessLevelFormatEnum::ASDEFINED => "AS_DEFINED",
|
||||
AccessPolicyAccessLevelFormatEnum::CEL => "CEL",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom< &str> for AccessPolicyAccessLevelFormatEnum {
|
||||
type Error = ();
|
||||
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
"LEVEL_FORMAT_UNSPECIFIED" => Ok(AccessPolicyAccessLevelFormatEnum::LEVELFORMATUNSPECIFIED),
|
||||
"AS_DEFINED" => Ok(AccessPolicyAccessLevelFormatEnum::ASDEFINED),
|
||||
"CEL" => Ok(AccessPolicyAccessLevelFormatEnum::CEL),
|
||||
_=> Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a AccessPolicyAccessLevelFormatEnum {
|
||||
fn into(self) -> std::borrow::Cow<'a, str> {
|
||||
self.as_ref().into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
119
gen/accesscontextmanager1/src/api/hub.rs
Normal file
119
gen/accesscontextmanager1/src/api/hub.rs
Normal file
@@ -0,0 +1,119 @@
|
||||
use super::*;
|
||||
|
||||
/// Central instance to access all AccessContextManager related resource activities
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Instantiate a new hub
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_accesscontextmanager1 as accesscontextmanager1;
|
||||
/// use accesscontextmanager1::{Result, Error};
|
||||
/// use accesscontextmanager1::api::enums::*;
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use accesscontextmanager1::{AccessContextManager, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
/// // `client_secret`, among other things.
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
/// // unless you replace `None` with the desired Flow.
|
||||
/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
/// // retrieve them from storage.
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.operations().list("name")
|
||||
/// .page_token("takimata")
|
||||
/// .page_size(-52)
|
||||
/// .filter("duo")
|
||||
/// .doit().await;
|
||||
///
|
||||
/// match result {
|
||||
/// Err(e) => match e {
|
||||
/// // The Error enum provides details about what exactly happened.
|
||||
/// // You can also just use its `Debug`, `Display` or `Error` traits
|
||||
/// Error::HttpError(_)
|
||||
/// |Error::Io(_)
|
||||
/// |Error::MissingAPIKey
|
||||
/// |Error::MissingToken(_)
|
||||
/// |Error::Cancelled
|
||||
/// |Error::UploadSizeLimitExceeded(_, _)
|
||||
/// |Error::Failure(_)
|
||||
/// |Error::BadRequest(_)
|
||||
/// |Error::FieldClash(_)
|
||||
/// |Error::JsonDecodeError(_, _) => println!("{}", e),
|
||||
/// },
|
||||
/// Ok(res) => println!("Success: {:?}", res),
|
||||
/// }
|
||||
/// # }
|
||||
/// ```
|
||||
#[derive(Clone)]
|
||||
pub struct AccessContextManager<S> {
|
||||
pub client: hyper::Client<S, hyper::body::Body>,
|
||||
pub auth: Box<dyn client::GetToken>,
|
||||
pub(super) _user_agent: String,
|
||||
pub(super) _base_url: String,
|
||||
pub(super) _root_url: String,
|
||||
}
|
||||
|
||||
impl<'a, S> client::Hub for AccessContextManager<S> {}
|
||||
|
||||
impl<'a, S> AccessContextManager<S> {
|
||||
|
||||
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> AccessContextManager<S> {
|
||||
AccessContextManager {
|
||||
client,
|
||||
auth: Box::new(auth),
|
||||
_user_agent: "google-api-rust-client/5.0.5".to_string(),
|
||||
_base_url: "https://accesscontextmanager.googleapis.com/".to_string(),
|
||||
_root_url: "https://accesscontextmanager.googleapis.com/".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn access_policies(&'a self) -> AccessPolicyMethods<'a, S> {
|
||||
AccessPolicyMethods { hub: &self }
|
||||
}
|
||||
pub fn operations(&'a self) -> OperationMethods<'a, S> {
|
||||
OperationMethods { hub: &self }
|
||||
}
|
||||
pub fn organizations(&'a self) -> OrganizationMethods<'a, S> {
|
||||
OrganizationMethods { hub: &self }
|
||||
}
|
||||
pub fn services(&'a self) -> ServiceMethods<'a, S> {
|
||||
ServiceMethods { hub: &self }
|
||||
}
|
||||
|
||||
/// Set the user-agent header field to use in all requests to the server.
|
||||
/// It defaults to `google-api-rust-client/5.0.5`.
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
mem::replace(&mut self._user_agent, agent_name)
|
||||
}
|
||||
|
||||
/// Set the base url to use in all requests to the server.
|
||||
/// It defaults to `https://accesscontextmanager.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set base url.
|
||||
pub fn base_url(&mut self, new_base_url: String) -> String {
|
||||
mem::replace(&mut self._base_url, new_base_url)
|
||||
}
|
||||
|
||||
/// Set the root url to use in all requests to the server.
|
||||
/// It defaults to `https://accesscontextmanager.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set root url.
|
||||
pub fn root_url(&mut self, new_root_url: String) -> String {
|
||||
mem::replace(&mut self._root_url, new_root_url)
|
||||
}
|
||||
}
|
||||
877
gen/accesscontextmanager1/src/api/method_builders.rs
Normal file
877
gen/accesscontextmanager1/src/api/method_builders.rs
Normal file
@@ -0,0 +1,877 @@
|
||||
use super::*;
|
||||
/// A builder providing access to all methods supported on *accessPolicy* resources.
|
||||
/// It is not used directly, but through the [`AccessContextManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_accesscontextmanager1 as accesscontextmanager1;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use accesscontextmanager1::{AccessContextManager, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `access_levels_create(...)`, `access_levels_delete(...)`, `access_levels_get(...)`, `access_levels_list(...)`, `access_levels_patch(...)`, `access_levels_replace_all(...)`, `access_levels_test_iam_permissions(...)`, `authorized_orgs_descs_create(...)`, `authorized_orgs_descs_delete(...)`, `authorized_orgs_descs_get(...)`, `authorized_orgs_descs_list(...)`, `authorized_orgs_descs_patch(...)`, `create(...)`, `delete(...)`, `get(...)`, `get_iam_policy(...)`, `list(...)`, `patch(...)`, `service_perimeters_commit(...)`, `service_perimeters_create(...)`, `service_perimeters_delete(...)`, `service_perimeters_get(...)`, `service_perimeters_list(...)`, `service_perimeters_patch(...)`, `service_perimeters_replace_all(...)`, `service_perimeters_test_iam_permissions(...)`, `set_iam_policy(...)` and `test_iam_permissions(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.access_policies();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct AccessPolicyMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a AccessContextManager<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for AccessPolicyMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> AccessPolicyMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates an access level. The long-running operation from this RPC has a successful status after the access level propagates to long-lasting storage. If access levels contain errors, an error response is returned for the first error encountered.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. Resource name for the access policy which owns this Access Level. Format: `accessPolicies/{policy_id}`
|
||||
pub fn access_levels_create(&self, request: AccessLevel, parent: &str) -> AccessPolicyAccessLevelCreateCall<'a, S> {
|
||||
AccessPolicyAccessLevelCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes an access level based on the resource name. The long-running operation from this RPC has a successful status after the access level has been removed from long-lasting storage.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Resource name for the Access Level. Format: `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
|
||||
pub fn access_levels_delete(&self, name: &str) -> AccessPolicyAccessLevelDeleteCall<'a, S> {
|
||||
AccessPolicyAccessLevelDeleteCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets an access level based on the resource name.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Resource name for the Access Level. Format: `accessPolicies/{policy_id}/accessLevels/{access_level_id}`
|
||||
pub fn access_levels_get(&self, name: &str) -> AccessPolicyAccessLevelGetCall<'a, S> {
|
||||
AccessPolicyAccessLevelGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_access_level_format: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all access levels for an access policy.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. Resource name for the access policy to list Access Levels from. Format: `accessPolicies/{policy_id}`
|
||||
pub fn access_levels_list(&self, parent: &str) -> AccessPolicyAccessLevelListCall<'a, S> {
|
||||
AccessPolicyAccessLevelListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_access_level_format: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates an access level. The long-running operation from this RPC has a successful status after the changes to the access level propagate to long-lasting storage. If access levels contain errors, an error response is returned for the first error encountered.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.
|
||||
pub fn access_levels_patch(&self, request: AccessLevel, name: &str) -> AccessPolicyAccessLevelPatchCall<'a, S> {
|
||||
AccessPolicyAccessLevelPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_update_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Replaces all existing access levels in an access policy with the access levels provided. This is done atomically. The long-running operation from this RPC has a successful status after all replacements propagate to long-lasting storage. If the replacement contains errors, an error response is returned for the first error encountered. Upon error, the replacement is cancelled, and existing access levels are not affected. The Operation.response field contains ReplaceAccessLevelsResponse. Removing access levels contained in existing service perimeters result in an error.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. Resource name for the access policy which owns these Access Levels. Format: `accessPolicies/{policy_id}`
|
||||
pub fn access_levels_replace_all(&self, request: ReplaceAccessLevelsRequest, parent: &str) -> AccessPolicyAccessLevelReplaceAllCall<'a, S> {
|
||||
AccessPolicyAccessLevelReplaceAllCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Returns the IAM permissions that the caller has on the specified Access Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or ServicePerimeter. This method does not support other resources.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `resource` - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
||||
pub fn access_levels_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> AccessPolicyAccessLevelTestIamPermissionCall<'a, S> {
|
||||
AccessPolicyAccessLevelTestIamPermissionCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_resource: resource.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates an authorized orgs desc. The long-running operation from this RPC has a successful status after the authorized orgs desc propagates to long-lasting storage. If a authorized orgs desc contains errors, an error response is returned for the first error encountered. The name of this `AuthorizedOrgsDesc` will be assigned during creation.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. Resource name for the access policy which owns this Authorized Orgs Desc. Format: `accessPolicies/{policy_id}`
|
||||
pub fn authorized_orgs_descs_create(&self, request: AuthorizedOrgsDesc, parent: &str) -> AccessPolicyAuthorizedOrgsDescCreateCall<'a, S> {
|
||||
AccessPolicyAuthorizedOrgsDescCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes an authorized orgs desc based on the resource name. The long-running operation from this RPC has a successful status after the authorized orgs desc is removed from long-lasting storage.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Resource name for the Authorized Orgs Desc. Format: `accessPolicies/{policy_id}/authorizedOrgsDesc/{authorized_orgs_desc_id}`
|
||||
pub fn authorized_orgs_descs_delete(&self, name: &str) -> AccessPolicyAuthorizedOrgsDescDeleteCall<'a, S> {
|
||||
AccessPolicyAuthorizedOrgsDescDeleteCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets an authorized orgs desc based on the resource name.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Resource name for the Authorized Orgs Desc. Format: `accessPolicies/{policy_id}/authorizedOrgsDescs/{authorized_orgs_descs_id}`
|
||||
pub fn authorized_orgs_descs_get(&self, name: &str) -> AccessPolicyAuthorizedOrgsDescGetCall<'a, S> {
|
||||
AccessPolicyAuthorizedOrgsDescGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all authorized orgs descs for an access policy.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. Resource name for the access policy to list Authorized Orgs Desc from. Format: `accessPolicies/{policy_id}`
|
||||
pub fn authorized_orgs_descs_list(&self, parent: &str) -> AccessPolicyAuthorizedOrgsDescListCall<'a, S> {
|
||||
AccessPolicyAuthorizedOrgsDescListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates an authorized orgs desc. The long-running operation from this RPC has a successful status after the authorized orgs desc propagates to long-lasting storage. If a authorized orgs desc contains errors, an error response is returned for the first error encountered. Only the organization list in `AuthorizedOrgsDesc` can be updated. The name, authorization_type, asset_type and authorization_direction cannot be updated.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Resource name for the `AuthorizedOrgsDesc`. Format: `accessPolicies/{access_policy}/authorizedOrgsDescs/{authorized_orgs_desc}`. The `authorized_orgs_desc` component must begin with a letter, followed by alphanumeric characters or `_`. After you create an `AuthorizedOrgsDesc`, you cannot change its `name`.
|
||||
pub fn authorized_orgs_descs_patch(&self, request: AuthorizedOrgsDesc, name: &str) -> AccessPolicyAuthorizedOrgsDescPatchCall<'a, S> {
|
||||
AccessPolicyAuthorizedOrgsDescPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_update_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Commits the dry-run specification for all the service perimeters in an access policy. A commit operation on a service perimeter involves copying its `spec` field to the `status` field of the service perimeter. Only service perimeters with `use_explicit_dry_run_spec` field set to true are affected by a commit operation. The long-running operation from this RPC has a successful status after the dry-run specifications for all the service perimeters have been committed. If a commit fails, it causes the long-running operation to return an error response and the entire commit operation is cancelled. When successful, the Operation.response field contains CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are cleared after a successful commit operation.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. Resource name for the parent Access Policy which owns all Service Perimeters in scope for the commit operation. Format: `accessPolicies/{policy_id}`
|
||||
pub fn service_perimeters_commit(&self, request: CommitServicePerimetersRequest, parent: &str) -> AccessPolicyServicePerimeterCommitCall<'a, S> {
|
||||
AccessPolicyServicePerimeterCommitCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates a service perimeter. The long-running operation from this RPC has a successful status after the service perimeter propagates to long-lasting storage. If a service perimeter contains errors, an error response is returned for the first error encountered.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. Resource name for the access policy which owns this Service Perimeter. Format: `accessPolicies/{policy_id}`
|
||||
pub fn service_perimeters_create(&self, request: ServicePerimeter, parent: &str) -> AccessPolicyServicePerimeterCreateCall<'a, S> {
|
||||
AccessPolicyServicePerimeterCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes a service perimeter based on the resource name. The long-running operation from this RPC has a successful status after the service perimeter is removed from long-lasting storage.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Resource name for the Service Perimeter. Format: `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}`
|
||||
pub fn service_perimeters_delete(&self, name: &str) -> AccessPolicyServicePerimeterDeleteCall<'a, S> {
|
||||
AccessPolicyServicePerimeterDeleteCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets a service perimeter based on the resource name.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Resource name for the Service Perimeter. Format: `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}`
|
||||
pub fn service_perimeters_get(&self, name: &str) -> AccessPolicyServicePerimeterGetCall<'a, S> {
|
||||
AccessPolicyServicePerimeterGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all service perimeters for an access policy.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. Resource name for the access policy to list Service Perimeters from. Format: `accessPolicies/{policy_id}`
|
||||
pub fn service_perimeters_list(&self, parent: &str) -> AccessPolicyServicePerimeterListCall<'a, S> {
|
||||
AccessPolicyServicePerimeterListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates a service perimeter. The long-running operation from this RPC has a successful status after the service perimeter propagates to long-lasting storage. If a service perimeter contains errors, an error response is returned for the first error encountered.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`. The `service_perimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`.
|
||||
pub fn service_perimeters_patch(&self, request: ServicePerimeter, name: &str) -> AccessPolicyServicePerimeterPatchCall<'a, S> {
|
||||
AccessPolicyServicePerimeterPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_update_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Replace all existing service perimeters in an access policy with the service perimeters provided. This is done atomically. The long-running operation from this RPC has a successful status after all replacements propagate to long-lasting storage. Replacements containing errors result in an error response for the first error encountered. Upon an error, replacement are cancelled and existing service perimeters are not affected. The Operation.response field contains ReplaceServicePerimetersResponse.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. Resource name for the access policy which owns these Service Perimeters. Format: `accessPolicies/{policy_id}`
|
||||
pub fn service_perimeters_replace_all(&self, request: ReplaceServicePerimetersRequest, parent: &str) -> AccessPolicyServicePerimeterReplaceAllCall<'a, S> {
|
||||
AccessPolicyServicePerimeterReplaceAllCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Returns the IAM permissions that the caller has on the specified Access Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or ServicePerimeter. This method does not support other resources.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `resource` - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
||||
pub fn service_perimeters_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> AccessPolicyServicePerimeterTestIamPermissionCall<'a, S> {
|
||||
AccessPolicyServicePerimeterTestIamPermissionCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_resource: resource.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates an access policy. This method fails if the organization already has an access policy. The long-running operation has a successful status after the access policy propagates to long-lasting storage. Syntactic and basic semantic errors are returned in `metadata` as a BadRequest proto.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
pub fn create(&self, request: AccessPolicy) -> AccessPolicyCreateCall<'a, S> {
|
||||
AccessPolicyCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes an access policy based on the resource name. The long-running operation has a successful status after the access policy is removed from long-lasting storage.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Resource name for the access policy to delete. Format `accessPolicies/{policy_id}`
|
||||
pub fn delete(&self, name: &str) -> AccessPolicyDeleteCall<'a, S> {
|
||||
AccessPolicyDeleteCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Returns an access policy based on the name.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Resource name for the access policy to get. Format `accessPolicies/{policy_id}`
|
||||
pub fn get(&self, name: &str) -> AccessPolicyGetCall<'a, S> {
|
||||
AccessPolicyGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the IAM policy for the specified Access Context Manager access policy.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `resource` - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
||||
pub fn get_iam_policy(&self, request: GetIamPolicyRequest, resource: &str) -> AccessPolicyGetIamPolicyCall<'a, S> {
|
||||
AccessPolicyGetIamPolicyCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_resource: resource.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all access policies in an organization.
|
||||
pub fn list(&self) -> AccessPolicyListCall<'a, S> {
|
||||
AccessPolicyListCall {
|
||||
hub: self.hub,
|
||||
_parent: Default::default(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates an access policy. The long-running operation from this RPC has a successful status after the changes to the access policy propagate to long-lasting storage.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}`
|
||||
pub fn patch(&self, request: AccessPolicy, name: &str) -> AccessPolicyPatchCall<'a, S> {
|
||||
AccessPolicyPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_update_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Sets the IAM policy for the specified Access Context Manager access policy. This method replaces the existing IAM policy on the access policy. The IAM policy controls the set of users who can perform specific operations on the Access Context Manager access policy.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `resource` - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
||||
pub fn set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> AccessPolicySetIamPolicyCall<'a, S> {
|
||||
AccessPolicySetIamPolicyCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_resource: resource.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Returns the IAM permissions that the caller has on the specified Access Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or ServicePerimeter. This method does not support other resources.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `resource` - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
||||
pub fn test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> AccessPolicyTestIamPermissionCall<'a, S> {
|
||||
AccessPolicyTestIamPermissionCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_resource: resource.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *operation* resources.
|
||||
/// It is not used directly, but through the [`AccessContextManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_accesscontextmanager1 as accesscontextmanager1;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use accesscontextmanager1::{AccessContextManager, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `cancel(...)`, `delete(...)`, `get(...)` and `list(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.operations();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct OperationMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a AccessContextManager<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for OperationMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> OperationMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - The name of the operation resource to be cancelled.
|
||||
pub fn cancel(&self, request: CancelOperationRequest, name: &str) -> OperationCancelCall<'a, S> {
|
||||
OperationCancelCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - The name of the operation resource to be deleted.
|
||||
pub fn delete(&self, name: &str) -> OperationDeleteCall<'a, S> {
|
||||
OperationDeleteCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - The name of the operation resource.
|
||||
pub fn get(&self, name: &str) -> OperationGetCall<'a, S> {
|
||||
OperationGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - The name of the operation's parent resource.
|
||||
pub fn list(&self, name: &str) -> OperationListCall<'a, S> {
|
||||
OperationListCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *organization* resources.
|
||||
/// It is not used directly, but through the [`AccessContextManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_accesscontextmanager1 as accesscontextmanager1;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use accesscontextmanager1::{AccessContextManager, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `gcp_user_access_bindings_create(...)`, `gcp_user_access_bindings_delete(...)`, `gcp_user_access_bindings_get(...)`, `gcp_user_access_bindings_list(...)` and `gcp_user_access_bindings_patch(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.organizations();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct OrganizationMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a AccessContextManager<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for OrganizationMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> OrganizationMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates a GcpUserAccessBinding. If the client specifies a name, the server ignores it. Fails if a resource already exists with the same group_key. Completion of this long-running operation does not necessarily signify that the new binding is deployed onto all affected users, which may take more time.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. Example: "organizations/256"
|
||||
pub fn gcp_user_access_bindings_create(&self, request: GcpUserAccessBinding, parent: &str) -> OrganizationGcpUserAccessBindingCreateCall<'a, S> {
|
||||
OrganizationGcpUserAccessBindingCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes a GcpUserAccessBinding. Completion of this long-running operation does not necessarily signify that the binding deletion is deployed onto all affected users, which may take more time.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
|
||||
pub fn gcp_user_access_bindings_delete(&self, name: &str) -> OrganizationGcpUserAccessBindingDeleteCall<'a, S> {
|
||||
OrganizationGcpUserAccessBindingDeleteCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the GcpUserAccessBinding with the given name.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
|
||||
pub fn gcp_user_access_bindings_get(&self, name: &str) -> OrganizationGcpUserAccessBindingGetCall<'a, S> {
|
||||
OrganizationGcpUserAccessBindingGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all GcpUserAccessBindings for a Google Cloud organization.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. Example: "organizations/256"
|
||||
pub fn gcp_user_access_bindings_list(&self, parent: &str) -> OrganizationGcpUserAccessBindingListCall<'a, S> {
|
||||
OrganizationGcpUserAccessBindingListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates a GcpUserAccessBinding. Completion of this long-running operation does not necessarily signify that the changed binding is deployed onto all affected users, which may take more time.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Immutable. Assigned by the server during creation. The last segment has an arbitrary length and has only URI unreserved characters (as defined by [RFC 3986 Section 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). Should not be specified by the client during creation. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
|
||||
pub fn gcp_user_access_bindings_patch(&self, request: GcpUserAccessBinding, name: &str) -> OrganizationGcpUserAccessBindingPatchCall<'a, S> {
|
||||
OrganizationGcpUserAccessBindingPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_update_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *service* resources.
|
||||
/// It is not used directly, but through the [`AccessContextManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_accesscontextmanager1 as accesscontextmanager1;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use accesscontextmanager1::{AccessContextManager, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `get(...)` and `list(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.services();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct ServiceMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a AccessContextManager<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for ServiceMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> ServiceMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Returns a VPC-SC supported service based on the service name.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - The name of the service to get information about. The names must be in the same format as used in defining a service perimeter, for example, `storage.googleapis.com`.
|
||||
pub fn get(&self, name: &str) -> ServiceGetCall<'a, S> {
|
||||
ServiceGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all VPC-SC supported services.
|
||||
pub fn list(&self) -> ServiceListCall<'a, S> {
|
||||
ServiceListCall {
|
||||
hub: self.hub,
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
35
gen/accesscontextmanager1/src/api/mod.rs
Normal file
35
gen/accesscontextmanager1/src/api/mod.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use std::collections::HashMap;
|
||||
use std::cell::RefCell;
|
||||
use std::default::Default;
|
||||
use std::collections::BTreeSet;
|
||||
use std::error::Error as StdError;
|
||||
use serde_json as json;
|
||||
use std::io;
|
||||
use std::fs;
|
||||
use std::mem;
|
||||
|
||||
use hyper::client::connect;
|
||||
use tokio::io::{AsyncRead, AsyncWrite};
|
||||
use tokio::time::sleep;
|
||||
use tower_service;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use crate::{client, client::GetToken, client::serde_with};
|
||||
|
||||
mod utilities;
|
||||
pub use utilities::*;
|
||||
|
||||
mod hub;
|
||||
pub use hub::*;
|
||||
|
||||
mod schemas;
|
||||
pub use schemas::*;
|
||||
|
||||
mod method_builders;
|
||||
pub use method_builders::*;
|
||||
|
||||
mod call_builders;
|
||||
pub use call_builders::*;
|
||||
|
||||
pub mod enums;
|
||||
pub(crate) use enums::*;
|
||||
1194
gen/accesscontextmanager1/src/api/schemas.rs
Normal file
1194
gen/accesscontextmanager1/src/api/schemas.rs
Normal file
File diff suppressed because it is too large
Load Diff
24
gen/accesscontextmanager1/src/api/utilities.rs
Normal file
24
gen/accesscontextmanager1/src/api/utilities.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
use super::*;
|
||||
/// Identifies the an OAuth2 authorization scope.
|
||||
/// A scope is needed when requesting an
|
||||
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
|
||||
#[derive(PartialEq, Eq, Hash, Debug, Clone)]
|
||||
pub enum Scope {
|
||||
/// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
||||
CloudPlatform,
|
||||
}
|
||||
|
||||
impl AsRef<str> for Scope {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Scope {
|
||||
fn default() -> Scope {
|
||||
Scope::CloudPlatform
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *Access Context Manager* crate version *5.0.4+20240226*, where *20240226* is the exact revision of the *accesscontextmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
|
||||
//! This documentation was generated from *Access Context Manager* crate version *5.0.5+20240417*, where *20240417* is the exact revision of the *accesscontextmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
|
||||
//!
|
||||
//! Everything else about the *Access Context Manager* *v1* API can be found at the
|
||||
//! [official documentation site](https://cloud.google.com/access-context-manager/docs/reference/rest/).
|
||||
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/accesscontextmanager1).
|
||||
//! # Features
|
||||
//!
|
||||
//! Handle the following *Resources* with ease from the central [hub](AccessContextManager) ...
|
||||
//! Handle the following *Resources* with ease from the central [hub](AccessContextManager) ...
|
||||
//!
|
||||
//! * [access policies](api::AccessPolicy)
|
||||
//! * [*access levels create*](api::AccessPolicyAccessLevelCreateCall), [*access levels delete*](api::AccessPolicyAccessLevelDeleteCall), [*access levels get*](api::AccessPolicyAccessLevelGetCall), [*access levels list*](api::AccessPolicyAccessLevelListCall), [*access levels patch*](api::AccessPolicyAccessLevelPatchCall), [*access levels replace all*](api::AccessPolicyAccessLevelReplaceAllCall), [*access levels test iam permissions*](api::AccessPolicyAccessLevelTestIamPermissionCall), [*authorized orgs descs create*](api::AccessPolicyAuthorizedOrgsDescCreateCall), [*authorized orgs descs delete*](api::AccessPolicyAuthorizedOrgsDescDeleteCall), [*authorized orgs descs get*](api::AccessPolicyAuthorizedOrgsDescGetCall), [*authorized orgs descs list*](api::AccessPolicyAuthorizedOrgsDescListCall), [*authorized orgs descs patch*](api::AccessPolicyAuthorizedOrgsDescPatchCall), [*create*](api::AccessPolicyCreateCall), [*delete*](api::AccessPolicyDeleteCall), [*get*](api::AccessPolicyGetCall), [*get iam policy*](api::AccessPolicyGetIamPolicyCall), [*list*](api::AccessPolicyListCall), [*patch*](api::AccessPolicyPatchCall), [*service perimeters commit*](api::AccessPolicyServicePerimeterCommitCall), [*service perimeters create*](api::AccessPolicyServicePerimeterCreateCall), [*service perimeters delete*](api::AccessPolicyServicePerimeterDeleteCall), [*service perimeters get*](api::AccessPolicyServicePerimeterGetCall), [*service perimeters list*](api::AccessPolicyServicePerimeterListCall), [*service perimeters patch*](api::AccessPolicyServicePerimeterPatchCall), [*service perimeters replace all*](api::AccessPolicyServicePerimeterReplaceAllCall), [*service perimeters test iam permissions*](api::AccessPolicyServicePerimeterTestIamPermissionCall), [*set iam policy*](api::AccessPolicySetIamPolicyCall) and [*test iam permissions*](api::AccessPolicyTestIamPermissionCall)
|
||||
@@ -77,8 +77,8 @@
|
||||
//! let r = hub.organizations().gcp_user_access_bindings_patch(...).doit().await
|
||||
//! ```
|
||||
//!
|
||||
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
|
||||
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
|
||||
//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
|
||||
//! The `doit()` method performs the actual communication with the server and returns the respective result.
|
||||
//!
|
||||
@@ -102,23 +102,24 @@
|
||||
//! extern crate hyper_rustls;
|
||||
//! extern crate google_accesscontextmanager1 as accesscontextmanager1;
|
||||
//! use accesscontextmanager1::{Result, Error};
|
||||
//! use accesscontextmanager1::api::enums::*;
|
||||
//! # async fn dox() {
|
||||
//! use std::default::Default;
|
||||
//! use accesscontextmanager1::{AccessContextManager, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
//!
|
||||
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
//! // `client_secret`, among other things.
|
||||
//! let secret: oauth2::ApplicationSecret = Default::default();
|
||||
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
//! // unless you replace `None` with the desired Flow.
|
||||
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
//! // retrieve them from storage.
|
||||
//! let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
//! secret,
|
||||
//! oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
//! ).build().await.unwrap();
|
||||
//! let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
//! let mut hub = AccessContextManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
|
||||
//! // You can configure optional parameters by calling the respective setters at will, and
|
||||
//! // execute the final call using `doit()`.
|
||||
//! // Values shown here are possibly random and not representative !
|
||||
@@ -150,10 +151,10 @@
|
||||
//! ## Handling Errors
|
||||
//!
|
||||
//! All errors produced by the system are provided either as [Result](client::Result) enumeration as return value of
|
||||
//! the doit() methods, or handed as possibly intermediate results to either the
|
||||
//! the doit() methods, or handed as possibly intermediate results to either the
|
||||
//! [Hub Delegate](client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
|
||||
//!
|
||||
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||||
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
|
||||
//! makes the system potentially resilient to all kinds of errors.
|
||||
//!
|
||||
//! ## Uploads and Downloads
|
||||
@@ -163,25 +164,25 @@
|
||||
//! 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
|
||||
//! this call: `.param("alt", "media")`.
|
||||
//!
|
||||
//! Methods supporting uploads can do so using up to 2 different protocols:
|
||||
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
//! Methods supporting uploads can do so using up to 2 different protocols:
|
||||
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
|
||||
//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
|
||||
//!
|
||||
//! ## Customization and Callbacks
|
||||
//!
|
||||
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
|
||||
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
|
||||
//! Respective methods will be called to provide progress information, as well as determine whether the system should
|
||||
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
|
||||
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
|
||||
//! Respective methods will be called to provide progress information, as well as determine whether the system should
|
||||
//! retry on failure.
|
||||
//!
|
||||
//! The [delegate trait](client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
|
||||
//!
|
||||
//! ## Optional Parts in Server-Requests
|
||||
//!
|
||||
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
|
||||
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
|
||||
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
//! are valid.
|
||||
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
|
||||
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
|
||||
//! the server to indicate either the set parts of the request or the desired parts in the response.
|
||||
//!
|
||||
//! ## Builder Arguments
|
||||
|
||||
Reference in New Issue
Block a user