#![allow(rustdoc::bare_urls)]
#![allow(rustdoc::broken_intra_doc_links)]
#![allow(rustdoc::invalid_html_tags)]
#![allow(rustdoc::redundant_explicit_links)]
#[derive(Clone, Debug)]
pub struct MapsPlatformDatasets {
inner: std::sync::Arc<dyn super::stub::dynamic::MapsPlatformDatasets>,
}
impl MapsPlatformDatasets {
pub fn builder() -> super::builder::maps_platform_datasets::ClientBuilder {
crate::new_client_builder(super::builder::maps_platform_datasets::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::MapsPlatformDatasets + 'static,
{
Self { inner: stub.into() }
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::MapsPlatformDatasets>>
{
if gaxi::options::tracing_enabled(&conf) {
return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
}
Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
}
async fn build_transport(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::MapsPlatformDatasets> {
super::transport::MapsPlatformDatasets::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::MapsPlatformDatasets> {
Self::build_transport(conf)
.await
.map(super::tracing::MapsPlatformDatasets::new)
}
pub fn create_dataset(&self) -> super::builder::maps_platform_datasets::CreateDataset {
super::builder::maps_platform_datasets::CreateDataset::new(self.inner.clone())
}
pub fn update_dataset_metadata(
&self,
) -> super::builder::maps_platform_datasets::UpdateDatasetMetadata {
super::builder::maps_platform_datasets::UpdateDatasetMetadata::new(self.inner.clone())
}
pub fn get_dataset(&self) -> super::builder::maps_platform_datasets::GetDataset {
super::builder::maps_platform_datasets::GetDataset::new(self.inner.clone())
}
pub fn fetch_dataset_errors(
&self,
) -> super::builder::maps_platform_datasets::FetchDatasetErrors {
super::builder::maps_platform_datasets::FetchDatasetErrors::new(self.inner.clone())
}
pub fn list_datasets(&self) -> super::builder::maps_platform_datasets::ListDatasets {
super::builder::maps_platform_datasets::ListDatasets::new(self.inner.clone())
}
pub fn delete_dataset(&self) -> super::builder::maps_platform_datasets::DeleteDataset {
super::builder::maps_platform_datasets::DeleteDataset::new(self.inner.clone())
}
}