pub struct FeaturedContentNativeDashboardService { /* private fields */ }Expand description
Implements a client for the Chronicle API.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
async fn sample(
project_id: &str,
location_id: &str,
instance_id: &str,
) -> anyhow::Result<()> {
let client = FeaturedContentNativeDashboardService::builder().build().await?;
let mut list = client.list_featured_content_native_dashboards()
.set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/contentHub"))
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}§Service Description
This service provides functionality for managing FeaturedContentNativeDashboard.
§Configuration
To configure FeaturedContentNativeDashboardService use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://chronicle.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured with Private Google Access with VPC Service Controls) may want to override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
FeaturedContentNativeDashboardService holds a connection pool internally, it is advised to
create one and reuse it. You do not need to wrap FeaturedContentNativeDashboardService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl FeaturedContentNativeDashboardService
impl FeaturedContentNativeDashboardService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for FeaturedContentNativeDashboardService.
let client = FeaturedContentNativeDashboardService::builder().build().await?;Sourcepub fn from_stub<T>(stub: impl Into<Arc<T>>) -> Selfwhere
T: FeaturedContentNativeDashboardService + 'static,
pub fn from_stub<T>(stub: impl Into<Arc<T>>) -> Selfwhere
T: FeaturedContentNativeDashboardService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn get_featured_content_native_dashboard(
&self,
) -> GetFeaturedContentNativeDashboard
pub fn get_featured_content_native_dashboard( &self, ) -> GetFeaturedContentNativeDashboard
Get a native dashboard featured content.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FeaturedContentNativeDashboardService, project_id: &str, location_id: &str, instance_id: &str, featured_content_native_dashboard_id: &str
) -> Result<()> {
let response = client.get_featured_content_native_dashboard()
.set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard_id}"))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_featured_content_native_dashboards(
&self,
) -> ListFeaturedContentNativeDashboards
pub fn list_featured_content_native_dashboards( &self, ) -> ListFeaturedContentNativeDashboards
List all native dashboards featured content.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FeaturedContentNativeDashboardService, project_id: &str, location_id: &str, instance_id: &str
) -> Result<()> {
let mut list = client.list_featured_content_native_dashboards()
.set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/contentHub"))
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn install_featured_content_native_dashboard(
&self,
) -> InstallFeaturedContentNativeDashboard
pub fn install_featured_content_native_dashboard( &self, ) -> InstallFeaturedContentNativeDashboard
Install a native dashboard featured content.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FeaturedContentNativeDashboardService
) -> Result<()> {
let response = client.install_featured_content_native_dashboard()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FeaturedContentNativeDashboardService
) -> Result<()> {
let mut list = client.list_operations()
/* set fields */
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FeaturedContentNativeDashboardService
) -> Result<()> {
let response = client.get_operation()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FeaturedContentNativeDashboardService
) -> Result<()> {
client.delete_operation()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FeaturedContentNativeDashboardService
) -> Result<()> {
client.cancel_operation()
/* set fields */
.send().await?;
Ok(())
}Trait Implementations§
Source§impl Clone for FeaturedContentNativeDashboardService
impl Clone for FeaturedContentNativeDashboardService
Source§fn clone(&self) -> FeaturedContentNativeDashboardService
fn clone(&self) -> FeaturedContentNativeDashboardService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more