pub struct NativeDashboardService { /* 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 = NativeDashboardService::builder().build().await?;
let mut list = client.list_native_dashboards()
.set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}§Service Description
A service providing functionality for managing native dashboards.
§Configuration
To configure NativeDashboardService 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
NativeDashboardService holds a connection pool internally, it is advised to
create one and reuse it. You do not need to wrap NativeDashboardService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl NativeDashboardService
impl NativeDashboardService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for NativeDashboardService.
let client = NativeDashboardService::builder().build().await?;Sourcepub fn from_stub<T>(stub: impl Into<Arc<T>>) -> Selfwhere
T: NativeDashboardService + 'static,
pub fn from_stub<T>(stub: impl Into<Arc<T>>) -> Selfwhere
T: NativeDashboardService + '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 create_native_dashboard(&self) -> CreateNativeDashboard
pub fn create_native_dashboard(&self) -> CreateNativeDashboard
Create a dashboard.
§Example
use google_cloud_chronicle_v1::model::NativeDashboard;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService, project_id: &str, location_id: &str, instance_id: &str
) -> Result<()> {
let response = client.create_native_dashboard()
.set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))
.set_native_dashboard(
NativeDashboard::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_native_dashboard(&self) -> GetNativeDashboard
pub fn get_native_dashboard(&self) -> GetNativeDashboard
Get a dashboard.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService, project_id: &str, location_id: &str, instance_id: &str, dashboard_id: &str
) -> Result<()> {
let response = client.get_native_dashboard()
.set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_native_dashboards(&self) -> ListNativeDashboards
pub fn list_native_dashboards(&self) -> ListNativeDashboards
List all dashboards.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService, project_id: &str, location_id: &str, instance_id: &str
) -> Result<()> {
let mut list = client.list_native_dashboards()
.set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn update_native_dashboard(&self) -> UpdateNativeDashboard
pub fn update_native_dashboard(&self) -> UpdateNativeDashboard
Update a dashboard.
§Example
use google_cloud_wkt::FieldMask;
use google_cloud_chronicle_v1::model::NativeDashboard;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService, project_id: &str, location_id: &str, instance_id: &str, dashboard_id: &str
) -> Result<()> {
let response = client.update_native_dashboard()
.set_native_dashboard(
NativeDashboard::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"))/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn duplicate_native_dashboard(&self) -> DuplicateNativeDashboard
pub fn duplicate_native_dashboard(&self) -> DuplicateNativeDashboard
Duplicate a dashboard.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService
) -> Result<()> {
let response = client.duplicate_native_dashboard()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn delete_native_dashboard(&self) -> DeleteNativeDashboard
pub fn delete_native_dashboard(&self) -> DeleteNativeDashboard
Delete a dashboard.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService, project_id: &str, location_id: &str, instance_id: &str, dashboard_id: &str
) -> Result<()> {
client.delete_native_dashboard()
.set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/nativeDashboards/{dashboard_id}"))
.send().await?;
Ok(())
}Sourcepub fn add_chart(&self) -> AddChart
pub fn add_chart(&self) -> AddChart
Add chart in a dashboard.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService
) -> Result<()> {
let response = client.add_chart()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn remove_chart(&self) -> RemoveChart
pub fn remove_chart(&self) -> RemoveChart
Remove chart from a dashboard.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService
) -> Result<()> {
let response = client.remove_chart()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn edit_chart(&self) -> EditChart
pub fn edit_chart(&self) -> EditChart
Edit chart in a dashboard.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService
) -> Result<()> {
let response = client.edit_chart()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn duplicate_chart(&self) -> DuplicateChart
pub fn duplicate_chart(&self) -> DuplicateChart
Duplicate chart in a dashboard.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService
) -> Result<()> {
let response = client.duplicate_chart()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn export_native_dashboards(&self) -> ExportNativeDashboards
pub fn export_native_dashboards(&self) -> ExportNativeDashboards
Exports the dashboards.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService
) -> Result<()> {
let response = client.export_native_dashboards()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn import_native_dashboards(&self) -> ImportNativeDashboards
pub fn import_native_dashboards(&self) -> ImportNativeDashboards
Imports the dashboards.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &NativeDashboardService
) -> Result<()> {
let response = client.import_native_dashboards()
/* 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: &NativeDashboardService
) -> 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: &NativeDashboardService
) -> 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: &NativeDashboardService
) -> 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: &NativeDashboardService
) -> Result<()> {
client.cancel_operation()
/* set fields */
.send().await?;
Ok(())
}Trait Implementations§
Source§impl Clone for NativeDashboardService
impl Clone for NativeDashboardService
Source§fn clone(&self) -> NativeDashboardService
fn clone(&self) -> NativeDashboardService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more