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:
3869
gen/deploymentmanager2_beta2/src/api/call_builders.rs
Normal file
3869
gen/deploymentmanager2_beta2/src/api/call_builders.rs
Normal file
File diff suppressed because it is too large
Load Diff
127
gen/deploymentmanager2_beta2/src/api/hub.rs
Normal file
127
gen/deploymentmanager2_beta2/src/api/hub.rs
Normal file
@@ -0,0 +1,127 @@
|
||||
use super::*;
|
||||
|
||||
/// Central instance to access all DeploymentManager related resource activities
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Instantiate a new hub
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_deploymentmanager2_beta2 as deploymentmanager2_beta2;
|
||||
/// use deploymentmanager2_beta2::api::Deployment;
|
||||
/// use deploymentmanager2_beta2::{Result, Error};
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use deploymentmanager2_beta2::{DeploymentManager, 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 = DeploymentManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
/// // As the method needs a request, you would usually fill it with the desired information
|
||||
/// // into the respective structure. Some of the parts shown here might not be applicable !
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let mut req = Deployment::default();
|
||||
///
|
||||
/// // 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.deployments().patch(req, "project", "deployment")
|
||||
/// .update_policy("ipsum")
|
||||
/// .delete_policy("gubergren")
|
||||
/// .create_policy("Lorem")
|
||||
/// .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 DeploymentManager<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 DeploymentManager<S> {}
|
||||
|
||||
impl<'a, S> DeploymentManager<S> {
|
||||
|
||||
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> DeploymentManager<S> {
|
||||
DeploymentManager {
|
||||
client,
|
||||
auth: Box::new(auth),
|
||||
_user_agent: "google-api-rust-client/5.0.3".to_string(),
|
||||
_base_url: "https://www.googleapis.com/deploymentmanager/v2beta2/projects/".to_string(),
|
||||
_root_url: "https://www.googleapis.com/".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn deployments(&'a self) -> DeploymentMethods<'a, S> {
|
||||
DeploymentMethods { hub: &self }
|
||||
}
|
||||
pub fn manifests(&'a self) -> ManifestMethods<'a, S> {
|
||||
ManifestMethods { hub: &self }
|
||||
}
|
||||
pub fn operations(&'a self) -> OperationMethods<'a, S> {
|
||||
OperationMethods { hub: &self }
|
||||
}
|
||||
pub fn resources(&'a self) -> ResourceMethods<'a, S> {
|
||||
ResourceMethods { hub: &self }
|
||||
}
|
||||
pub fn types(&'a self) -> TypeMethods<'a, S> {
|
||||
TypeMethods { 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.3`.
|
||||
///
|
||||
/// 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://www.googleapis.com/deploymentmanager/v2beta2/projects/`.
|
||||
///
|
||||
/// 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://www.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)
|
||||
}
|
||||
}
|
||||
476
gen/deploymentmanager2_beta2/src/api/method_builders.rs
Normal file
476
gen/deploymentmanager2_beta2/src/api/method_builders.rs
Normal file
@@ -0,0 +1,476 @@
|
||||
use super::*;
|
||||
/// A builder providing access to all methods supported on *deployment* resources.
|
||||
/// It is not used directly, but through the [`DeploymentManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_deploymentmanager2_beta2 as deploymentmanager2_beta2;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use deploymentmanager2_beta2::{DeploymentManager, 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 = DeploymentManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `patch(...)` and `update(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.deployments();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct DeploymentMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a DeploymentManager<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for DeploymentMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> DeploymentMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes a deployment and all of the resources in the deployment.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `deployment` - The name of the deployment for this request.
|
||||
pub fn delete(&self, project: &str, deployment: &str) -> DeploymentDeleteCall<'a, S> {
|
||||
DeploymentDeleteCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_deployment: deployment.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about a specific deployment.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `deployment` - The name of the deployment for this request.
|
||||
pub fn get(&self, project: &str, deployment: &str) -> DeploymentGetCall<'a, S> {
|
||||
DeploymentGetCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_deployment: deployment.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates a deployment and all of the resources described by the deployment manifest.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `project` - The project ID for this request.
|
||||
pub fn insert(&self, request: Deployment, project: &str) -> DeploymentInsertCall<'a, S> {
|
||||
DeploymentInsertCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_project: project.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all deployments for a given project.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
pub fn list(&self, project: &str) -> DeploymentListCall<'a, S> {
|
||||
DeploymentListCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_max_results: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `deployment` - The name of the deployment for this request.
|
||||
pub fn patch(&self, request: Deployment, project: &str, deployment: &str) -> DeploymentPatchCall<'a, S> {
|
||||
DeploymentPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_project: project.to_string(),
|
||||
_deployment: deployment.to_string(),
|
||||
_update_policy: Default::default(),
|
||||
_delete_policy: Default::default(),
|
||||
_create_policy: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates a deployment and all of the resources described by the deployment manifest.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `deployment` - The name of the deployment for this request.
|
||||
pub fn update(&self, request: Deployment, project: &str, deployment: &str) -> DeploymentUpdateCall<'a, S> {
|
||||
DeploymentUpdateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_project: project.to_string(),
|
||||
_deployment: deployment.to_string(),
|
||||
_update_policy: Default::default(),
|
||||
_delete_policy: Default::default(),
|
||||
_create_policy: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *manifest* resources.
|
||||
/// It is not used directly, but through the [`DeploymentManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_deploymentmanager2_beta2 as deploymentmanager2_beta2;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use deploymentmanager2_beta2::{DeploymentManager, 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 = DeploymentManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().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.manifests();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct ManifestMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a DeploymentManager<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for ManifestMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> ManifestMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about a specific manifest.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `deployment` - The name of the deployment for this request.
|
||||
/// * `manifest` - The name of the manifest for this request.
|
||||
pub fn get(&self, project: &str, deployment: &str, manifest: &str) -> ManifestGetCall<'a, S> {
|
||||
ManifestGetCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_deployment: deployment.to_string(),
|
||||
_manifest: manifest.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all manifests for a given deployment.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `deployment` - The name of the deployment for this request.
|
||||
pub fn list(&self, project: &str, deployment: &str) -> ManifestListCall<'a, S> {
|
||||
ManifestListCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_deployment: deployment.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_max_results: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_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 [`DeploymentManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_deploymentmanager2_beta2 as deploymentmanager2_beta2;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use deploymentmanager2_beta2::{DeploymentManager, 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 = DeploymentManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().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.operations();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct OperationMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a DeploymentManager<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:
|
||||
///
|
||||
/// Gets information about a specific operation.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `operation` - The name of the operation for this request.
|
||||
pub fn get(&self, project: &str, operation: &str) -> OperationGetCall<'a, S> {
|
||||
OperationGetCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_operation: operation.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all operations for a project.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
pub fn list(&self, project: &str) -> OperationListCall<'a, S> {
|
||||
OperationListCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_max_results: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *resource* resources.
|
||||
/// It is not used directly, but through the [`DeploymentManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_deploymentmanager2_beta2 as deploymentmanager2_beta2;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use deploymentmanager2_beta2::{DeploymentManager, 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 = DeploymentManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().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.resources();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct ResourceMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a DeploymentManager<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for ResourceMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> ResourceMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about a single resource.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `deployment` - The name of the deployment for this request.
|
||||
/// * `resource` - The name of the resource for this request.
|
||||
pub fn get(&self, project: &str, deployment: &str, resource: &str) -> ResourceGetCall<'a, S> {
|
||||
ResourceGetCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_deployment: deployment.to_string(),
|
||||
_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 resources in a given deployment.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
/// * `deployment` - The name of the deployment for this request.
|
||||
pub fn list(&self, project: &str, deployment: &str) -> ResourceListCall<'a, S> {
|
||||
ResourceListCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_deployment: deployment.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_max_results: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *type* resources.
|
||||
/// It is not used directly, but through the [`DeploymentManager`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_deploymentmanager2_beta2 as deploymentmanager2_beta2;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use deploymentmanager2_beta2::{DeploymentManager, 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 = DeploymentManager::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `list(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.types();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct TypeMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a DeploymentManager<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for TypeMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> TypeMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all resource types for Deployment Manager.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `project` - The project ID for this request.
|
||||
pub fn list(&self, project: &str) -> TypeListCall<'a, S> {
|
||||
TypeListCall {
|
||||
hub: self.hub,
|
||||
_project: project.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_max_results: Default::default(),
|
||||
_filter: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
32
gen/deploymentmanager2_beta2/src/api/mod.rs
Normal file
32
gen/deploymentmanager2_beta2/src/api/mod.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
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::*;
|
||||
577
gen/deploymentmanager2_beta2/src/api/schemas.rs
Normal file
577
gen/deploymentmanager2_beta2/src/api/schemas.rs
Normal file
@@ -0,0 +1,577 @@
|
||||
use super::*;
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [delete deployments](DeploymentDeleteCall) (none)
|
||||
/// * [get deployments](DeploymentGetCall) (response)
|
||||
/// * [insert deployments](DeploymentInsertCall) (request)
|
||||
/// * [list deployments](DeploymentListCall) (none)
|
||||
/// * [patch deployments](DeploymentPatchCall) (request)
|
||||
/// * [update deployments](DeploymentUpdateCall) (request)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Deployment {
|
||||
/// An optional user-provided description of the deployment.
|
||||
|
||||
pub description: Option<String>,
|
||||
/// Specifies a fingerprint for update() requests. A fingerprint is a randomly generated value that must be provided in update() requests to perform optimistic locking. This ensures optimistic concurrency so that only one update can be performed at a time. The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a get() request to a deployment.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
pub fingerprint: Option<Vec<u8>>,
|
||||
/// [Output Only] Unique identifier for the resource; defined by the server.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub id: Option<u64>,
|
||||
/// [Output Only] Timestamp when the deployment was created, in RFC3339 text format .
|
||||
#[serde(rename="insertTime")]
|
||||
|
||||
pub insert_time: Option<String>,
|
||||
/// [Input Only] Specifies how Deployment Manager should apply this template. Possible options are PREVIEW, UPDATE, and CANCEL.
|
||||
///
|
||||
/// PREVIEW creates a deployment and creates "shell" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. You can use this intent to preview updates to deployments or preview new deployments. You must provide a target.config with a configuration for this intent. After previewing a deployment, you can deploy your resources by making a request with the UPDATE intent or you can CANCEL the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.
|
||||
///
|
||||
/// UPDATE performs an update to the underlying resources in a deployment. If you provide a populated target.config field with this request, Deployment Manager uses that configuration to perform an update. If you had previewed this update beforehand, and do not supply a target.config or provide an empty target.config, Deployment Manager uses the last previewed configuration.
|
||||
///
|
||||
/// CANCEL cancels an update that is in PREVIEW or UPDATE but does not undo any changes already made.
|
||||
|
||||
pub intent: Option<String>,
|
||||
/// [Output Only] URL of the manifest representing the last manifest that was successfully deployed.
|
||||
|
||||
pub manifest: Option<String>,
|
||||
/// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// [Output Only] The current state of the deployment. This can be DEPLOYED, DEPLOYMENT_FAILED, PREVIEWING, UPDATING, and CANCELING.
|
||||
|
||||
pub state: Option<String>,
|
||||
/// [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates.
|
||||
|
||||
pub target: Option<TargetConfiguration>,
|
||||
/// [Output Only] If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here.
|
||||
|
||||
pub update: Option<DeploymentUpdate>,
|
||||
/// [Output Only] Timestamp when the deployment was updated, in RFC3339 text format .
|
||||
#[serde(rename="updateTime")]
|
||||
|
||||
pub update_time: Option<String>,
|
||||
}
|
||||
|
||||
impl client::RequestValue for Deployment {}
|
||||
impl client::Resource for Deployment {}
|
||||
impl client::ResponseResult for Deployment {}
|
||||
|
||||
|
||||
///
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DeploymentUpdate {
|
||||
/// [Output Only] List of all errors encountered while trying to enact the update.
|
||||
|
||||
pub errors: Option<Vec<String>>,
|
||||
/// [Output Only] URL of the manifest representing the update configuration of this deployment.
|
||||
|
||||
pub manifest: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for DeploymentUpdate {}
|
||||
|
||||
|
||||
/// A response containing a partial list of deployments and a page token used to build the next request if the request has been truncated.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [list deployments](DeploymentListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct DeploymentsListResponse {
|
||||
/// [Output Only] The deployments contained in this response.
|
||||
|
||||
pub deployments: Option<Vec<Deployment>>,
|
||||
/// [Output Only] A token used to continue a truncated list request.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for DeploymentsListResponse {}
|
||||
|
||||
|
||||
///
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ImportFile {
|
||||
/// The contents of the file.
|
||||
|
||||
pub content: Option<String>,
|
||||
/// The name of the file.
|
||||
|
||||
pub name: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for ImportFile {}
|
||||
|
||||
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [get manifests](ManifestGetCall) (response)
|
||||
/// * [list manifests](ManifestListCall) (none)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Manifest {
|
||||
/// [Output Only] The YAML configuration for this manifest.
|
||||
|
||||
pub config: Option<String>,
|
||||
/// [Output Only] The fully-expanded configuration file, including any templates and references.
|
||||
#[serde(rename="evaluatedConfig")]
|
||||
|
||||
pub evaluated_config: Option<String>,
|
||||
/// [Output Only] Unique identifier for the resource; defined by the server.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub id: Option<u64>,
|
||||
/// [Output Only] The imported files for this manifest.
|
||||
|
||||
pub imports: Option<Vec<ImportFile>>,
|
||||
/// [Output Only] Timestamp when the manifest was created, in RFC3339 text format.
|
||||
#[serde(rename="insertTime")]
|
||||
|
||||
pub insert_time: Option<String>,
|
||||
/// [Output Only] The YAML layout for this manifest.
|
||||
|
||||
pub layout: Option<String>,
|
||||
/// [Output Only] The name of the manifest.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// [Output Only] Self link for the manifest.
|
||||
#[serde(rename="selfLink")]
|
||||
|
||||
pub self_link: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Resource for Manifest {}
|
||||
impl client::ResponseResult for Manifest {}
|
||||
|
||||
|
||||
/// A response containing a partial list of manifests and a page token used to build the next request if the request has been truncated.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [list manifests](ManifestListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ManifestsListResponse {
|
||||
/// [Output Only] Manifests contained in this list response.
|
||||
|
||||
pub manifests: Option<Vec<Manifest>>,
|
||||
/// [Output Only] A token used to continue a truncated list request.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ManifestsListResponse {}
|
||||
|
||||
|
||||
/// An Operation resource, used to manage asynchronous API requests.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [delete deployments](DeploymentDeleteCall) (response)
|
||||
/// * [insert deployments](DeploymentInsertCall) (response)
|
||||
/// * [patch deployments](DeploymentPatchCall) (response)
|
||||
/// * [update deployments](DeploymentUpdateCall) (response)
|
||||
/// * [get operations](OperationGetCall) (response)
|
||||
/// * [list operations](OperationListCall) (none)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Operation {
|
||||
/// [Output Only] Reserved for future use.
|
||||
#[serde(rename="clientOperationId")]
|
||||
|
||||
pub client_operation_id: Option<String>,
|
||||
/// [Output Only] Creation timestamp in RFC3339 text format.
|
||||
#[serde(rename="creationTimestamp")]
|
||||
|
||||
pub creation_timestamp: Option<String>,
|
||||
/// [Output Only] A textual description of the operation, which is set when the operation is created.
|
||||
|
||||
pub description: Option<String>,
|
||||
/// [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
|
||||
#[serde(rename="endTime")]
|
||||
|
||||
pub end_time: Option<String>,
|
||||
/// [Output Only] If errors are generated during processing of the operation, this field will be populated.
|
||||
|
||||
pub error: Option<OperationError>,
|
||||
/// [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
|
||||
#[serde(rename="httpErrorMessage")]
|
||||
|
||||
pub http_error_message: Option<String>,
|
||||
/// [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
|
||||
#[serde(rename="httpErrorStatusCode")]
|
||||
|
||||
pub http_error_status_code: Option<i32>,
|
||||
/// [Output Only] The unique identifier for the resource. This identifier is defined by the server.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub id: Option<u64>,
|
||||
/// [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
|
||||
#[serde(rename="insertTime")]
|
||||
|
||||
pub insert_time: Option<String>,
|
||||
/// [Output Only] Type of the resource. Always compute#operation for Operation resources.
|
||||
|
||||
pub kind: Option<String>,
|
||||
/// [Output Only] Name of the resource.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// [Output Only] The type of operation, such as insert, update, or delete, and so on.
|
||||
#[serde(rename="operationType")]
|
||||
|
||||
pub operation_type: Option<String>,
|
||||
/// [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
|
||||
|
||||
pub progress: Option<i32>,
|
||||
/// [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
|
||||
|
||||
pub region: Option<String>,
|
||||
/// [Output Only] Server-defined URL for the resource.
|
||||
#[serde(rename="selfLink")]
|
||||
|
||||
pub self_link: Option<String>,
|
||||
/// [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
|
||||
#[serde(rename="startTime")]
|
||||
|
||||
pub start_time: Option<String>,
|
||||
/// [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
|
||||
|
||||
pub status: Option<String>,
|
||||
/// [Output Only] An optional textual description of the current status of the operation.
|
||||
#[serde(rename="statusMessage")]
|
||||
|
||||
pub status_message: Option<String>,
|
||||
/// [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
|
||||
#[serde(rename="targetId")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub target_id: Option<u64>,
|
||||
/// [Output Only] The URL of the resource that the operation modifies.
|
||||
#[serde(rename="targetLink")]
|
||||
|
||||
pub target_link: Option<String>,
|
||||
/// [Output Only] User who requested the operation, for example: user@example.com.
|
||||
|
||||
pub user: Option<String>,
|
||||
/// [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
|
||||
|
||||
pub warnings: Option<Vec<OperationWarnings>>,
|
||||
/// [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
|
||||
|
||||
pub zone: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Resource for Operation {}
|
||||
impl client::ResponseResult for Operation {}
|
||||
|
||||
|
||||
/// A response containing a partial list of operations and a page token used to build the next request if the request has been truncated.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [list operations](OperationListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct OperationsListResponse {
|
||||
/// [Output Only] A token used to continue a truncated list request.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// [Output Only] Operations contained in this list response.
|
||||
|
||||
pub operations: Option<Vec<Operation>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for OperationsListResponse {}
|
||||
|
||||
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [get resources](ResourceGetCall) (response)
|
||||
/// * [list resources](ResourceListCall) (none)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Resource {
|
||||
/// [Output Only] The evaluated properties of the resource with references expanded. Returned as serialized YAML.
|
||||
#[serde(rename="finalProperties")]
|
||||
|
||||
pub final_properties: Option<String>,
|
||||
/// [Output Only] Unique identifier for the resource; defined by the server.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub id: Option<u64>,
|
||||
/// [Output Only] Timestamp when the resource was created or acquired, in RFC3339 text format .
|
||||
#[serde(rename="insertTime")]
|
||||
|
||||
pub insert_time: Option<String>,
|
||||
/// [Output Only] URL of the manifest representing the current configuration of this resource.
|
||||
|
||||
pub manifest: Option<String>,
|
||||
/// [Output Only] The name of the resource as it appears in the YAML config.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// [Output Only] The current properties of the resource before any references have been filled in. Returned as serialized YAML.
|
||||
|
||||
pub properties: Option<String>,
|
||||
/// [Output Only] The type of the resource, for example compute.v1.instance, or replicaPools.v1beta2.instanceGroupManager.
|
||||
#[serde(rename="type")]
|
||||
|
||||
pub type_: Option<String>,
|
||||
/// [Output Only] If Deployment Manager is currently updating or previewing an update to this resource, the updated configuration appears here.
|
||||
|
||||
pub update: Option<ResourceUpdate>,
|
||||
/// [Output Only] Timestamp when the resource was updated, in RFC3339 text format .
|
||||
#[serde(rename="updateTime")]
|
||||
|
||||
pub update_time: Option<String>,
|
||||
/// [Output Only] The URL of the actual resource.
|
||||
|
||||
pub url: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Resource for Resource {}
|
||||
impl client::ResponseResult for Resource {}
|
||||
|
||||
|
||||
///
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ResourceUpdate {
|
||||
/// [Output Only] List of all errors encountered while trying to enact update.intent.
|
||||
|
||||
pub errors: Option<Vec<String>>,
|
||||
/// [Output Only] The expanded properties of the resource with reference values expanded. Returned as serialized YAML.
|
||||
#[serde(rename="finalProperties")]
|
||||
|
||||
pub final_properties: Option<String>,
|
||||
/// [Output Only] The intent of the resource: PREVIEW, UPDATE, or CANCEL.
|
||||
|
||||
pub intent: Option<String>,
|
||||
/// [Output Only] URL of the manifest representing the update configuration of this resource.
|
||||
|
||||
pub manifest: Option<String>,
|
||||
/// [Output Only] The set of updated properties for this resource, before references are expanded. Returned as serialized YAML.
|
||||
|
||||
pub properties: Option<String>,
|
||||
/// [Output Only] The state of the resource.
|
||||
|
||||
pub state: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for ResourceUpdate {}
|
||||
|
||||
|
||||
/// A response containing a partial list of resources and a page token used to build the next request if the request has been truncated.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [list resources](ResourceListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ResourcesListResponse {
|
||||
/// A token used to continue a truncated list request.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// Resources contained in this list response.
|
||||
|
||||
pub resources: Option<Vec<Resource>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ResourcesListResponse {}
|
||||
|
||||
|
||||
///
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct TargetConfiguration {
|
||||
/// The configuration to use for this deployment.
|
||||
|
||||
pub config: Option<String>,
|
||||
/// Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template.
|
||||
|
||||
pub imports: Option<Vec<ImportFile>>,
|
||||
}
|
||||
|
||||
impl client::Part for TargetConfiguration {}
|
||||
|
||||
|
||||
/// A resource type supported by Deployment Manager.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [list types](TypeListCall) (none)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Type {
|
||||
/// [Output Only] Unique identifier for the resource; defined by the server.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub id: Option<u64>,
|
||||
/// [Output Only] Timestamp when the type was created, in RFC3339 text format.
|
||||
#[serde(rename="insertTime")]
|
||||
|
||||
pub insert_time: Option<String>,
|
||||
/// Name of the type.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// [Output Only] Self link for the type.
|
||||
#[serde(rename="selfLink")]
|
||||
|
||||
pub self_link: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Resource for Type {}
|
||||
|
||||
|
||||
/// A response that returns all Types supported by Deployment Manager
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [list types](TypeListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct TypesListResponse {
|
||||
/// A token used to continue a truncated list request.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// [Output Only] A list of resource types supported by Deployment Manager.
|
||||
|
||||
pub types: Option<Vec<Type>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for TypesListResponse {}
|
||||
|
||||
|
||||
/// [Output Only] If errors are generated during processing of the operation, this field will be populated.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct OperationError {
|
||||
/// [Output Only] The array of errors encountered while processing this operation.
|
||||
|
||||
pub errors: Option<Vec<OperationErrorErrors>>,
|
||||
}
|
||||
|
||||
impl client::NestedType for OperationError {}
|
||||
impl client::Part for OperationError {}
|
||||
|
||||
|
||||
/// [Output Only] The array of errors encountered while processing this operation.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct OperationErrorErrors {
|
||||
/// [Output Only] The error type identifier for this error.
|
||||
|
||||
pub code: Option<String>,
|
||||
/// [Output Only] Indicates the field in the request which caused the error. This property is optional.
|
||||
|
||||
pub location: Option<String>,
|
||||
/// [Output Only] An optional, human-readable error message.
|
||||
|
||||
pub message: Option<String>,
|
||||
}
|
||||
|
||||
impl client::NestedType for OperationErrorErrors {}
|
||||
impl client::Part for OperationErrorErrors {}
|
||||
|
||||
|
||||
/// [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct OperationWarnings {
|
||||
/// [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
|
||||
|
||||
pub code: Option<String>,
|
||||
/// [Output Only] Metadata about this warning in key: value format. For example:
|
||||
/// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
|
||||
|
||||
pub data: Option<Vec<OperationWarningsData>>,
|
||||
/// [Output Only] A human-readable description of the warning code.
|
||||
|
||||
pub message: Option<String>,
|
||||
}
|
||||
|
||||
impl client::NestedType for OperationWarnings {}
|
||||
impl client::Part for OperationWarnings {}
|
||||
|
||||
|
||||
/// [Output Only] Metadata about this warning in key: value format. For example:
|
||||
/// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct OperationWarningsData {
|
||||
/// [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
|
||||
|
||||
pub key: Option<String>,
|
||||
/// [Output Only] A warning data value corresponding to the key.
|
||||
|
||||
pub value: Option<String>,
|
||||
}
|
||||
|
||||
impl client::NestedType for OperationWarningsData {}
|
||||
impl client::Part for OperationWarningsData {}
|
||||
|
||||
|
||||
36
gen/deploymentmanager2_beta2/src/api/utilities.rs
Normal file
36
gen/deploymentmanager2_beta2/src/api/utilities.rs
Normal file
@@ -0,0 +1,36 @@
|
||||
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 {
|
||||
/// View and manage your data across Google Cloud Platform services
|
||||
CloudPlatform,
|
||||
|
||||
/// View your data across Google Cloud Platform services
|
||||
CloudPlatformReadOnly,
|
||||
|
||||
/// View and manage your Google Cloud Platform management resources and deployment status information
|
||||
NdevCloudman,
|
||||
|
||||
/// View your Google Cloud Platform management resources and deployment status information
|
||||
NdevCloudmanReadonly,
|
||||
}
|
||||
|
||||
impl AsRef<str> for Scope {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
|
||||
Scope::CloudPlatformReadOnly => "https://www.googleapis.com/auth/cloud-platform.read-only",
|
||||
Scope::NdevCloudman => "https://www.googleapis.com/auth/ndev.cloudman",
|
||||
Scope::NdevCloudmanReadonly => "https://www.googleapis.com/auth/ndev.cloudman.readonly",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Scope {
|
||||
fn default() -> Scope {
|
||||
Scope::NdevCloudmanReadonly
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user