pub struct FolderMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on folder resources.
It is not used directly, but through the CloudAsset hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_cloudasset1_beta1 as cloudasset1_beta1;
use cloudasset1_beta1::{CloudAsset, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = CloudAsset::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `export_assets(...)` and `operations_get(...)`
// to build up your call.
let rb = hub.folders();Implementations§
Source§impl<'a, C> FolderMethods<'a, C>
impl<'a, C> FolderMethods<'a, C>
Sourcepub fn operations_get(&self, name: &str) -> FolderOperationGetCall<'a, C>
pub fn operations_get(&self, name: &str) -> FolderOperationGetCall<'a, C>
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.
Sourcepub fn export_assets(
&self,
request: ExportAssetsRequest,
parent: &str,
) -> FolderExportAssetCall<'a, C>
pub fn export_assets( &self, request: ExportAssetsRequest, parent: &str, ) -> FolderExportAssetCall<'a, C>
Create a builder to help you perform the following task:
Exports assets with time and resource types to a given Cloud Storage location. The output format is newline-delimited JSON. This API implements the google.longrunning.Operation API allowing you to keep track of the export. We recommend intervals of at least 2 seconds with exponential retry to poll the export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes.
§Arguments
request- No description provided.parent- Required. The relative name of the root asset. This can only be an organization number (such as “organizations/123”), a project ID (such as “projects/my-project-id”), a project number (such as “projects/12345”), or a folder number (such as “folders/123”).