#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#[derive(Clone, Debug)]
pub struct AppHub {
inner: std::sync::Arc<dyn super::stub::dynamic::AppHub>,
}
impl AppHub {
pub fn builder() -> super::builder::app_hub::ClientBuilder {
crate::new_client_builder(super::builder::app_hub::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::AppHub + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
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::AppHub>> {
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::AppHub> {
super::transport::AppHub::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::AppHub> {
Self::build_transport(conf)
.await
.map(super::tracing::AppHub::new)
}
pub fn lookup_service_project_attachment(
&self,
) -> super::builder::app_hub::LookupServiceProjectAttachment {
super::builder::app_hub::LookupServiceProjectAttachment::new(self.inner.clone())
}
pub fn list_service_project_attachments(
&self,
) -> super::builder::app_hub::ListServiceProjectAttachments {
super::builder::app_hub::ListServiceProjectAttachments::new(self.inner.clone())
}
pub fn create_service_project_attachment(
&self,
) -> super::builder::app_hub::CreateServiceProjectAttachment {
super::builder::app_hub::CreateServiceProjectAttachment::new(self.inner.clone())
}
pub fn get_service_project_attachment(
&self,
) -> super::builder::app_hub::GetServiceProjectAttachment {
super::builder::app_hub::GetServiceProjectAttachment::new(self.inner.clone())
}
pub fn delete_service_project_attachment(
&self,
) -> super::builder::app_hub::DeleteServiceProjectAttachment {
super::builder::app_hub::DeleteServiceProjectAttachment::new(self.inner.clone())
}
pub fn detach_service_project_attachment(
&self,
) -> super::builder::app_hub::DetachServiceProjectAttachment {
super::builder::app_hub::DetachServiceProjectAttachment::new(self.inner.clone())
}
pub fn list_discovered_services(&self) -> super::builder::app_hub::ListDiscoveredServices {
super::builder::app_hub::ListDiscoveredServices::new(self.inner.clone())
}
pub fn get_discovered_service(&self) -> super::builder::app_hub::GetDiscoveredService {
super::builder::app_hub::GetDiscoveredService::new(self.inner.clone())
}
pub fn lookup_discovered_service(&self) -> super::builder::app_hub::LookupDiscoveredService {
super::builder::app_hub::LookupDiscoveredService::new(self.inner.clone())
}
pub fn list_services(&self) -> super::builder::app_hub::ListServices {
super::builder::app_hub::ListServices::new(self.inner.clone())
}
pub fn create_service(&self) -> super::builder::app_hub::CreateService {
super::builder::app_hub::CreateService::new(self.inner.clone())
}
pub fn get_service(&self) -> super::builder::app_hub::GetService {
super::builder::app_hub::GetService::new(self.inner.clone())
}
pub fn update_service(&self) -> super::builder::app_hub::UpdateService {
super::builder::app_hub::UpdateService::new(self.inner.clone())
}
pub fn delete_service(&self) -> super::builder::app_hub::DeleteService {
super::builder::app_hub::DeleteService::new(self.inner.clone())
}
pub fn list_discovered_workloads(&self) -> super::builder::app_hub::ListDiscoveredWorkloads {
super::builder::app_hub::ListDiscoveredWorkloads::new(self.inner.clone())
}
pub fn get_discovered_workload(&self) -> super::builder::app_hub::GetDiscoveredWorkload {
super::builder::app_hub::GetDiscoveredWorkload::new(self.inner.clone())
}
pub fn lookup_discovered_workload(&self) -> super::builder::app_hub::LookupDiscoveredWorkload {
super::builder::app_hub::LookupDiscoveredWorkload::new(self.inner.clone())
}
pub fn list_workloads(&self) -> super::builder::app_hub::ListWorkloads {
super::builder::app_hub::ListWorkloads::new(self.inner.clone())
}
pub fn create_workload(&self) -> super::builder::app_hub::CreateWorkload {
super::builder::app_hub::CreateWorkload::new(self.inner.clone())
}
pub fn get_workload(&self) -> super::builder::app_hub::GetWorkload {
super::builder::app_hub::GetWorkload::new(self.inner.clone())
}
pub fn update_workload(&self) -> super::builder::app_hub::UpdateWorkload {
super::builder::app_hub::UpdateWorkload::new(self.inner.clone())
}
pub fn delete_workload(&self) -> super::builder::app_hub::DeleteWorkload {
super::builder::app_hub::DeleteWorkload::new(self.inner.clone())
}
pub fn list_applications(&self) -> super::builder::app_hub::ListApplications {
super::builder::app_hub::ListApplications::new(self.inner.clone())
}
pub fn create_application(&self) -> super::builder::app_hub::CreateApplication {
super::builder::app_hub::CreateApplication::new(self.inner.clone())
}
pub fn get_application(&self) -> super::builder::app_hub::GetApplication {
super::builder::app_hub::GetApplication::new(self.inner.clone())
}
pub fn update_application(&self) -> super::builder::app_hub::UpdateApplication {
super::builder::app_hub::UpdateApplication::new(self.inner.clone())
}
pub fn delete_application(&self) -> super::builder::app_hub::DeleteApplication {
super::builder::app_hub::DeleteApplication::new(self.inner.clone())
}
pub fn list_locations(&self) -> super::builder::app_hub::ListLocations {
super::builder::app_hub::ListLocations::new(self.inner.clone())
}
pub fn get_location(&self) -> super::builder::app_hub::GetLocation {
super::builder::app_hub::GetLocation::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::app_hub::SetIamPolicy {
super::builder::app_hub::SetIamPolicy::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::app_hub::GetIamPolicy {
super::builder::app_hub::GetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::app_hub::TestIamPermissions {
super::builder::app_hub::TestIamPermissions::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::app_hub::ListOperations {
super::builder::app_hub::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::app_hub::GetOperation {
super::builder::app_hub::GetOperation::new(self.inner.clone())
}
pub fn delete_operation(&self) -> super::builder::app_hub::DeleteOperation {
super::builder::app_hub::DeleteOperation::new(self.inner.clone())
}
pub fn cancel_operation(&self) -> super::builder::app_hub::CancelOperation {
super::builder::app_hub::CancelOperation::new(self.inner.clone())
}
}