#![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 BackupDR {
inner: std::sync::Arc<dyn super::stub::dynamic::BackupDR>,
}
impl BackupDR {
pub fn builder() -> super::builder::backup_dr::ClientBuilder {
crate::new_client_builder(super::builder::backup_dr::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::BackupDR + '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::BackupDR>> {
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::BackupDR> {
super::transport::BackupDR::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::BackupDR> {
Self::build_transport(conf)
.await
.map(super::tracing::BackupDR::new)
}
pub fn list_management_servers(&self) -> super::builder::backup_dr::ListManagementServers {
super::builder::backup_dr::ListManagementServers::new(self.inner.clone())
}
pub fn get_management_server(&self) -> super::builder::backup_dr::GetManagementServer {
super::builder::backup_dr::GetManagementServer::new(self.inner.clone())
}
pub fn create_management_server(&self) -> super::builder::backup_dr::CreateManagementServer {
super::builder::backup_dr::CreateManagementServer::new(self.inner.clone())
}
pub fn delete_management_server(&self) -> super::builder::backup_dr::DeleteManagementServer {
super::builder::backup_dr::DeleteManagementServer::new(self.inner.clone())
}
pub fn create_backup_vault(&self) -> super::builder::backup_dr::CreateBackupVault {
super::builder::backup_dr::CreateBackupVault::new(self.inner.clone())
}
pub fn list_backup_vaults(&self) -> super::builder::backup_dr::ListBackupVaults {
super::builder::backup_dr::ListBackupVaults::new(self.inner.clone())
}
pub fn fetch_usable_backup_vaults(&self) -> super::builder::backup_dr::FetchUsableBackupVaults {
super::builder::backup_dr::FetchUsableBackupVaults::new(self.inner.clone())
}
pub fn get_backup_vault(&self) -> super::builder::backup_dr::GetBackupVault {
super::builder::backup_dr::GetBackupVault::new(self.inner.clone())
}
pub fn update_backup_vault(&self) -> super::builder::backup_dr::UpdateBackupVault {
super::builder::backup_dr::UpdateBackupVault::new(self.inner.clone())
}
pub fn delete_backup_vault(&self) -> super::builder::backup_dr::DeleteBackupVault {
super::builder::backup_dr::DeleteBackupVault::new(self.inner.clone())
}
pub fn list_data_sources(&self) -> super::builder::backup_dr::ListDataSources {
super::builder::backup_dr::ListDataSources::new(self.inner.clone())
}
pub fn get_data_source(&self) -> super::builder::backup_dr::GetDataSource {
super::builder::backup_dr::GetDataSource::new(self.inner.clone())
}
pub fn update_data_source(&self) -> super::builder::backup_dr::UpdateDataSource {
super::builder::backup_dr::UpdateDataSource::new(self.inner.clone())
}
pub fn list_backups(&self) -> super::builder::backup_dr::ListBackups {
super::builder::backup_dr::ListBackups::new(self.inner.clone())
}
pub fn fetch_backups_for_resource_type(
&self,
) -> super::builder::backup_dr::FetchBackupsForResourceType {
super::builder::backup_dr::FetchBackupsForResourceType::new(self.inner.clone())
}
pub fn get_backup(&self) -> super::builder::backup_dr::GetBackup {
super::builder::backup_dr::GetBackup::new(self.inner.clone())
}
pub fn update_backup(&self) -> super::builder::backup_dr::UpdateBackup {
super::builder::backup_dr::UpdateBackup::new(self.inner.clone())
}
pub fn delete_backup(&self) -> super::builder::backup_dr::DeleteBackup {
super::builder::backup_dr::DeleteBackup::new(self.inner.clone())
}
pub fn restore_backup(&self) -> super::builder::backup_dr::RestoreBackup {
super::builder::backup_dr::RestoreBackup::new(self.inner.clone())
}
pub fn create_backup_plan(&self) -> super::builder::backup_dr::CreateBackupPlan {
super::builder::backup_dr::CreateBackupPlan::new(self.inner.clone())
}
pub fn update_backup_plan(&self) -> super::builder::backup_dr::UpdateBackupPlan {
super::builder::backup_dr::UpdateBackupPlan::new(self.inner.clone())
}
pub fn get_backup_plan(&self) -> super::builder::backup_dr::GetBackupPlan {
super::builder::backup_dr::GetBackupPlan::new(self.inner.clone())
}
pub fn list_backup_plans(&self) -> super::builder::backup_dr::ListBackupPlans {
super::builder::backup_dr::ListBackupPlans::new(self.inner.clone())
}
pub fn delete_backup_plan(&self) -> super::builder::backup_dr::DeleteBackupPlan {
super::builder::backup_dr::DeleteBackupPlan::new(self.inner.clone())
}
pub fn get_backup_plan_revision(&self) -> super::builder::backup_dr::GetBackupPlanRevision {
super::builder::backup_dr::GetBackupPlanRevision::new(self.inner.clone())
}
pub fn list_backup_plan_revisions(&self) -> super::builder::backup_dr::ListBackupPlanRevisions {
super::builder::backup_dr::ListBackupPlanRevisions::new(self.inner.clone())
}
pub fn create_backup_plan_association(
&self,
) -> super::builder::backup_dr::CreateBackupPlanAssociation {
super::builder::backup_dr::CreateBackupPlanAssociation::new(self.inner.clone())
}
pub fn update_backup_plan_association(
&self,
) -> super::builder::backup_dr::UpdateBackupPlanAssociation {
super::builder::backup_dr::UpdateBackupPlanAssociation::new(self.inner.clone())
}
pub fn get_backup_plan_association(
&self,
) -> super::builder::backup_dr::GetBackupPlanAssociation {
super::builder::backup_dr::GetBackupPlanAssociation::new(self.inner.clone())
}
pub fn list_backup_plan_associations(
&self,
) -> super::builder::backup_dr::ListBackupPlanAssociations {
super::builder::backup_dr::ListBackupPlanAssociations::new(self.inner.clone())
}
pub fn fetch_backup_plan_associations_for_resource_type(
&self,
) -> super::builder::backup_dr::FetchBackupPlanAssociationsForResourceType {
super::builder::backup_dr::FetchBackupPlanAssociationsForResourceType::new(
self.inner.clone(),
)
}
pub fn delete_backup_plan_association(
&self,
) -> super::builder::backup_dr::DeleteBackupPlanAssociation {
super::builder::backup_dr::DeleteBackupPlanAssociation::new(self.inner.clone())
}
pub fn trigger_backup(&self) -> super::builder::backup_dr::TriggerBackup {
super::builder::backup_dr::TriggerBackup::new(self.inner.clone())
}
pub fn get_data_source_reference(&self) -> super::builder::backup_dr::GetDataSourceReference {
super::builder::backup_dr::GetDataSourceReference::new(self.inner.clone())
}
pub fn list_data_source_references(
&self,
) -> super::builder::backup_dr::ListDataSourceReferences {
super::builder::backup_dr::ListDataSourceReferences::new(self.inner.clone())
}
pub fn fetch_data_source_references_for_resource_type(
&self,
) -> super::builder::backup_dr::FetchDataSourceReferencesForResourceType {
super::builder::backup_dr::FetchDataSourceReferencesForResourceType::new(self.inner.clone())
}
pub fn initialize_service(&self) -> super::builder::backup_dr::InitializeService {
super::builder::backup_dr::InitializeService::new(self.inner.clone())
}
pub fn list_locations(&self) -> super::builder::backup_dr::ListLocations {
super::builder::backup_dr::ListLocations::new(self.inner.clone())
}
pub fn get_location(&self) -> super::builder::backup_dr::GetLocation {
super::builder::backup_dr::GetLocation::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::backup_dr::SetIamPolicy {
super::builder::backup_dr::SetIamPolicy::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::backup_dr::GetIamPolicy {
super::builder::backup_dr::GetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::backup_dr::TestIamPermissions {
super::builder::backup_dr::TestIamPermissions::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::backup_dr::ListOperations {
super::builder::backup_dr::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::backup_dr::GetOperation {
super::builder::backup_dr::GetOperation::new(self.inner.clone())
}
pub fn delete_operation(&self) -> super::builder::backup_dr::DeleteOperation {
super::builder::backup_dr::DeleteOperation::new(self.inner.clone())
}
pub fn cancel_operation(&self) -> super::builder::backup_dr::CancelOperation {
super::builder::backup_dr::CancelOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct BackupDrProtectionSummary {
inner: std::sync::Arc<dyn super::stub::dynamic::BackupDrProtectionSummary>,
}
impl BackupDrProtectionSummary {
pub fn builder() -> super::builder::backup_dr_protection_summary::ClientBuilder {
crate::new_client_builder(super::builder::backup_dr_protection_summary::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::BackupDrProtectionSummary + '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::BackupDrProtectionSummary>,
> {
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::BackupDrProtectionSummary> {
super::transport::BackupDrProtectionSummary::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::BackupDrProtectionSummary> {
Self::build_transport(conf)
.await
.map(super::tracing::BackupDrProtectionSummary::new)
}
pub fn list_resource_backup_configs(
&self,
) -> super::builder::backup_dr_protection_summary::ListResourceBackupConfigs {
super::builder::backup_dr_protection_summary::ListResourceBackupConfigs::new(
self.inner.clone(),
)
}
pub fn list_locations(&self) -> super::builder::backup_dr_protection_summary::ListLocations {
super::builder::backup_dr_protection_summary::ListLocations::new(self.inner.clone())
}
pub fn get_location(&self) -> super::builder::backup_dr_protection_summary::GetLocation {
super::builder::backup_dr_protection_summary::GetLocation::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::backup_dr_protection_summary::SetIamPolicy {
super::builder::backup_dr_protection_summary::SetIamPolicy::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::backup_dr_protection_summary::GetIamPolicy {
super::builder::backup_dr_protection_summary::GetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::backup_dr_protection_summary::TestIamPermissions {
super::builder::backup_dr_protection_summary::TestIamPermissions::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::backup_dr_protection_summary::ListOperations {
super::builder::backup_dr_protection_summary::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::backup_dr_protection_summary::GetOperation {
super::builder::backup_dr_protection_summary::GetOperation::new(self.inner.clone())
}
pub fn delete_operation(
&self,
) -> super::builder::backup_dr_protection_summary::DeleteOperation {
super::builder::backup_dr_protection_summary::DeleteOperation::new(self.inner.clone())
}
pub fn cancel_operation(
&self,
) -> super::builder::backup_dr_protection_summary::CancelOperation {
super::builder::backup_dr_protection_summary::CancelOperation::new(self.inner.clone())
}
}