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:
File diff suppressed because it is too large
Load Diff
115
gen/cloudprivatecatalog1_beta1/src/api/hub.rs
Normal file
115
gen/cloudprivatecatalog1_beta1/src/api/hub.rs
Normal file
@@ -0,0 +1,115 @@
|
||||
use super::*;
|
||||
|
||||
/// Central instance to access all CloudPrivateCatalog related resource activities
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Instantiate a new hub
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_cloudprivatecatalog1_beta1 as cloudprivatecatalog1_beta1;
|
||||
/// use cloudprivatecatalog1_beta1::{Result, Error};
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use cloudprivatecatalog1_beta1::{CloudPrivateCatalog, 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 = CloudPrivateCatalog::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().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.folders().catalogs_search("resource")
|
||||
/// .query("takimata")
|
||||
/// .page_token("amet.")
|
||||
/// .page_size(-20)
|
||||
/// .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 CloudPrivateCatalog<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 CloudPrivateCatalog<S> {}
|
||||
|
||||
impl<'a, S> CloudPrivateCatalog<S> {
|
||||
|
||||
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> CloudPrivateCatalog<S> {
|
||||
CloudPrivateCatalog {
|
||||
client,
|
||||
auth: Box::new(auth),
|
||||
_user_agent: "google-api-rust-client/5.0.3".to_string(),
|
||||
_base_url: "https://cloudprivatecatalog.googleapis.com/".to_string(),
|
||||
_root_url: "https://cloudprivatecatalog.googleapis.com/".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn folders(&'a self) -> FolderMethods<'a, S> {
|
||||
FolderMethods { hub: &self }
|
||||
}
|
||||
pub fn organizations(&'a self) -> OrganizationMethods<'a, S> {
|
||||
OrganizationMethods { hub: &self }
|
||||
}
|
||||
pub fn projects(&'a self) -> ProjectMethods<'a, S> {
|
||||
ProjectMethods { 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://cloudprivatecatalog.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://cloudprivatecatalog.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)
|
||||
}
|
||||
}
|
||||
328
gen/cloudprivatecatalog1_beta1/src/api/method_builders.rs
Normal file
328
gen/cloudprivatecatalog1_beta1/src/api/method_builders.rs
Normal file
@@ -0,0 +1,328 @@
|
||||
use super::*;
|
||||
/// A builder providing access to all methods supported on *folder* resources.
|
||||
/// It is not used directly, but through the [`CloudPrivateCatalog`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_cloudprivatecatalog1_beta1 as cloudprivatecatalog1_beta1;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use cloudprivatecatalog1_beta1::{CloudPrivateCatalog, 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 = CloudPrivateCatalog::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 `catalogs_search(...)`, `products_search(...)` and `versions_search(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.folders();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct FolderMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a CloudPrivateCatalog<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for FolderMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> FolderMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Search Catalog resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. It can be in following formats:
|
||||
/// * `projects/{project_id}`
|
||||
/// * `folders/{folder_id}`
|
||||
/// * `organizations/{organization_id}`
|
||||
pub fn catalogs_search(&self, resource: &str) -> FolderCatalogSearchCall<'a, S> {
|
||||
FolderCatalogSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: 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:
|
||||
///
|
||||
/// Search Product resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. See
|
||||
/// SearchCatalogsRequest.resource for details.
|
||||
pub fn products_search(&self, resource: &str) -> FolderProductSearchCall<'a, S> {
|
||||
FolderProductSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: 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:
|
||||
///
|
||||
/// Search Version resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. See
|
||||
/// SearchCatalogsRequest.resource for details.
|
||||
pub fn versions_search(&self, resource: &str) -> FolderVersionSearchCall<'a, S> {
|
||||
FolderVersionSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: Default::default(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: 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 [`CloudPrivateCatalog`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_cloudprivatecatalog1_beta1 as cloudprivatecatalog1_beta1;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use cloudprivatecatalog1_beta1::{CloudPrivateCatalog, 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 = CloudPrivateCatalog::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 `catalogs_search(...)`, `products_search(...)` and `versions_search(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.organizations();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct OrganizationMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a CloudPrivateCatalog<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:
|
||||
///
|
||||
/// Search Catalog resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. It can be in following formats:
|
||||
/// * `projects/{project_id}`
|
||||
/// * `folders/{folder_id}`
|
||||
/// * `organizations/{organization_id}`
|
||||
pub fn catalogs_search(&self, resource: &str) -> OrganizationCatalogSearchCall<'a, S> {
|
||||
OrganizationCatalogSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: 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:
|
||||
///
|
||||
/// Search Product resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. See
|
||||
/// SearchCatalogsRequest.resource for details.
|
||||
pub fn products_search(&self, resource: &str) -> OrganizationProductSearchCall<'a, S> {
|
||||
OrganizationProductSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: 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:
|
||||
///
|
||||
/// Search Version resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. See
|
||||
/// SearchCatalogsRequest.resource for details.
|
||||
pub fn versions_search(&self, resource: &str) -> OrganizationVersionSearchCall<'a, S> {
|
||||
OrganizationVersionSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: Default::default(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// A builder providing access to all methods supported on *project* resources.
|
||||
/// It is not used directly, but through the [`CloudPrivateCatalog`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_cloudprivatecatalog1_beta1 as cloudprivatecatalog1_beta1;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use cloudprivatecatalog1_beta1::{CloudPrivateCatalog, 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 = CloudPrivateCatalog::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 `catalogs_search(...)`, `products_search(...)` and `versions_search(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.projects();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct ProjectMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a CloudPrivateCatalog<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for ProjectMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> ProjectMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Search Catalog resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. It can be in following formats:
|
||||
/// * `projects/{project_id}`
|
||||
/// * `folders/{folder_id}`
|
||||
/// * `organizations/{organization_id}`
|
||||
pub fn catalogs_search(&self, resource: &str) -> ProjectCatalogSearchCall<'a, S> {
|
||||
ProjectCatalogSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: 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:
|
||||
///
|
||||
/// Search Product resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. See
|
||||
/// SearchCatalogsRequest.resource for details.
|
||||
pub fn products_search(&self, resource: &str) -> ProjectProductSearchCall<'a, S> {
|
||||
ProjectProductSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: 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:
|
||||
///
|
||||
/// Search Version resources that consumers have access to, within the
|
||||
/// scope of the consumer cloud resource hierarchy context.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `resource` - Required. The name of the resource context. See
|
||||
/// SearchCatalogsRequest.resource for details.
|
||||
pub fn versions_search(&self, resource: &str) -> ProjectVersionSearchCall<'a, S> {
|
||||
ProjectVersionSearchCall {
|
||||
hub: self.hub,
|
||||
_resource: resource.to_string(),
|
||||
_query: Default::default(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
32
gen/cloudprivatecatalog1_beta1/src/api/mod.rs
Normal file
32
gen/cloudprivatecatalog1_beta1/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::*;
|
||||
299
gen/cloudprivatecatalog1_beta1/src/api/schemas.rs
Normal file
299
gen/cloudprivatecatalog1_beta1/src/api/schemas.rs
Normal file
@@ -0,0 +1,299 @@
|
||||
use super::*;
|
||||
/// The readonly representation of a catalog computed with a given resource
|
||||
/// context.
|
||||
///
|
||||
/// 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 GoogleCloudPrivatecatalogV1beta1Catalog {
|
||||
/// Output only. The time when the catalog was created.
|
||||
#[serde(rename="createTime")]
|
||||
|
||||
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// Output only. The description of the catalog.
|
||||
|
||||
pub description: Option<String>,
|
||||
/// Output only. The descriptive name of the catalog as it appears in UIs.
|
||||
#[serde(rename="displayName")]
|
||||
|
||||
pub display_name: Option<String>,
|
||||
/// Output only. The resource name of the target catalog, in the format of
|
||||
/// `catalogs/{catalog_id}'.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. The time when the catalog was last updated.
|
||||
#[serde(rename="updateTime")]
|
||||
|
||||
pub update_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
}
|
||||
|
||||
impl client::Part for GoogleCloudPrivatecatalogV1beta1Catalog {}
|
||||
|
||||
|
||||
/// The readonly representation of a product computed with a given resource
|
||||
/// context.
|
||||
///
|
||||
/// 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 GoogleCloudPrivatecatalogV1beta1Product {
|
||||
/// Output only. The type of the product asset. It can be one of the
|
||||
/// following values:
|
||||
///
|
||||
/// * `google.deploymentmanager.Template`
|
||||
/// * `google.cloudprivatecatalog.ListingOnly`
|
||||
#[serde(rename="assetType")]
|
||||
|
||||
pub asset_type: Option<String>,
|
||||
/// Output only. The time when the product was created.
|
||||
#[serde(rename="createTime")]
|
||||
|
||||
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// Output only. The display metadata to describe the product.
|
||||
/// The JSON schema of the metadata differs by Product.asset_type.
|
||||
/// When the type is `google.deploymentmanager.Template`, the schema is as
|
||||
/// follows:
|
||||
///
|
||||
/// ````
|
||||
/// "$schema": http://json-schema.org/draft-04/schema#
|
||||
/// type: object
|
||||
/// properties:
|
||||
/// name:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 64
|
||||
/// description:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 2048
|
||||
/// tagline:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 100
|
||||
/// support_info:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 2048
|
||||
/// creator:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 100
|
||||
/// documentation:
|
||||
/// type: array
|
||||
/// items:
|
||||
/// type: object
|
||||
/// properties:
|
||||
/// url:
|
||||
/// type: string
|
||||
/// pattern:
|
||||
/// "^(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"
|
||||
/// title:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 64
|
||||
/// description:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 2048
|
||||
/// required:
|
||||
/// - name
|
||||
/// - description
|
||||
/// additionalProperties: false
|
||||
///
|
||||
/// ````
|
||||
///
|
||||
/// When the asset type is `google.cloudprivatecatalog.ListingOnly`, the schema
|
||||
/// is as follows:
|
||||
///
|
||||
/// ````
|
||||
/// "$schema": http://json-schema.org/draft-04/schema#
|
||||
/// type: object
|
||||
/// properties:
|
||||
/// name:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 64
|
||||
/// description:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 2048
|
||||
/// tagline:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 100
|
||||
/// support_info:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 2048
|
||||
/// creator:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 100
|
||||
/// documentation:
|
||||
/// type: array
|
||||
/// items:
|
||||
/// type: object
|
||||
/// properties:
|
||||
/// url:
|
||||
/// type: string
|
||||
/// pattern:
|
||||
/// "^(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"
|
||||
/// title:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 64
|
||||
/// description:
|
||||
/// type: string
|
||||
/// minLength: 1
|
||||
/// maxLength: 2048
|
||||
/// signup_url:
|
||||
/// type: string
|
||||
/// pattern:
|
||||
/// "^(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"
|
||||
/// required:
|
||||
/// - name
|
||||
/// - description
|
||||
/// - signup_url
|
||||
/// additionalProperties: false
|
||||
/// ````
|
||||
#[serde(rename="displayMetadata")]
|
||||
|
||||
pub display_metadata: Option<HashMap<String, json::Value>>,
|
||||
/// Output only. The icon URI of the product.
|
||||
#[serde(rename="iconUri")]
|
||||
|
||||
pub icon_uri: Option<String>,
|
||||
/// Output only. The resource name of the target product, in the format of
|
||||
/// `products/a-z*[a-z0-9]'.
|
||||
///
|
||||
/// A unique identifier for the product under a catalog.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. The time when the product was last updated.
|
||||
#[serde(rename="updateTime")]
|
||||
|
||||
pub update_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
}
|
||||
|
||||
impl client::Part for GoogleCloudPrivatecatalogV1beta1Product {}
|
||||
|
||||
|
||||
/// Response message for PrivateCatalog.SearchCatalogs.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [catalogs search folders](FolderCatalogSearchCall) (response)
|
||||
/// * [catalogs search organizations](OrganizationCatalogSearchCall) (response)
|
||||
/// * [catalogs search projects](ProjectCatalogSearchCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct GoogleCloudPrivatecatalogV1beta1SearchCatalogsResponse {
|
||||
/// The `Catalog`s computed from the resource context.
|
||||
|
||||
pub catalogs: Option<Vec<GoogleCloudPrivatecatalogV1beta1Catalog>>,
|
||||
/// A pagination token returned from a previous call to SearchCatalogs that
|
||||
/// indicates from where listing should continue.
|
||||
/// This field is optional.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for GoogleCloudPrivatecatalogV1beta1SearchCatalogsResponse {}
|
||||
|
||||
|
||||
/// Response message for PrivateCatalog.SearchProducts.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [products search folders](FolderProductSearchCall) (response)
|
||||
/// * [products search organizations](OrganizationProductSearchCall) (response)
|
||||
/// * [products search projects](ProjectProductSearchCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct GoogleCloudPrivatecatalogV1beta1SearchProductsResponse {
|
||||
/// A pagination token returned from a previous call to SearchProducts that
|
||||
/// indicates from where listing should continue.
|
||||
/// This field is optional.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// The `Product` resources computed from the resource context.
|
||||
|
||||
pub products: Option<Vec<GoogleCloudPrivatecatalogV1beta1Product>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for GoogleCloudPrivatecatalogV1beta1SearchProductsResponse {}
|
||||
|
||||
|
||||
/// Response message for PrivateCatalog.SearchVersions.
|
||||
///
|
||||
/// # 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*).
|
||||
///
|
||||
/// * [versions search folders](FolderVersionSearchCall) (response)
|
||||
/// * [versions search organizations](OrganizationVersionSearchCall) (response)
|
||||
/// * [versions search projects](ProjectVersionSearchCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct GoogleCloudPrivatecatalogV1beta1SearchVersionsResponse {
|
||||
/// A pagination token returned from a previous call to SearchVersions that
|
||||
/// indicates from where the listing should continue.
|
||||
/// This field is optional.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// The `Version` resources computed from the resource context.
|
||||
|
||||
pub versions: Option<Vec<GoogleCloudPrivatecatalogV1beta1Version>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for GoogleCloudPrivatecatalogV1beta1SearchVersionsResponse {}
|
||||
|
||||
|
||||
/// The consumer representation of a version which is a child resource under a
|
||||
/// `Product` with asset data.
|
||||
///
|
||||
/// 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 GoogleCloudPrivatecatalogV1beta1Version {
|
||||
/// Output only. The asset which has been validated and is ready to be
|
||||
/// provisioned. See
|
||||
/// google.cloud.privatecatalogproducer.v1beta.Version.asset for details.
|
||||
|
||||
pub asset: Option<HashMap<String, json::Value>>,
|
||||
/// Output only. The time when the version was created.
|
||||
#[serde(rename="createTime")]
|
||||
|
||||
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// Output only. The user-supplied description of the version. Maximum of 256
|
||||
/// characters.
|
||||
|
||||
pub description: Option<String>,
|
||||
/// Output only. The resource name of the version, in the format
|
||||
/// `catalogs/{catalog_id}/products/{product_id}/versions/a-z*[a-z0-9]'.
|
||||
///
|
||||
/// A unique identifier for the version under a product.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. The time when the version was last updated.
|
||||
#[serde(rename="updateTime")]
|
||||
|
||||
pub update_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
}
|
||||
|
||||
impl client::Part for GoogleCloudPrivatecatalogV1beta1Version {}
|
||||
|
||||
|
||||
24
gen/cloudprivatecatalog1_beta1/src/api/utilities.rs
Normal file
24
gen/cloudprivatecatalog1_beta1/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 {
|
||||
/// View and manage your data across Google Cloud Platform services
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user