#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#[derive(Clone, Debug)]
pub struct IdentityAwareProxyAdminService {
inner: std::sync::Arc<dyn super::stub::dynamic::IdentityAwareProxyAdminService>,
}
impl IdentityAwareProxyAdminService {
pub fn builder() -> super::builder::identity_aware_proxy_admin_service::ClientBuilder {
crate::new_client_builder(
super::builder::identity_aware_proxy_admin_service::client::Factory,
)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::IdentityAwareProxyAdminService + '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::IdentityAwareProxyAdminService>,
> {
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::IdentityAwareProxyAdminService> {
super::transport::IdentityAwareProxyAdminService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::IdentityAwareProxyAdminService> {
Self::build_transport(conf)
.await
.map(super::tracing::IdentityAwareProxyAdminService::new)
}
pub fn set_iam_policy(
&self,
) -> super::builder::identity_aware_proxy_admin_service::SetIamPolicy {
super::builder::identity_aware_proxy_admin_service::SetIamPolicy::new(self.inner.clone())
}
pub fn get_iam_policy(
&self,
) -> super::builder::identity_aware_proxy_admin_service::GetIamPolicy {
super::builder::identity_aware_proxy_admin_service::GetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::identity_aware_proxy_admin_service::TestIamPermissions {
super::builder::identity_aware_proxy_admin_service::TestIamPermissions::new(
self.inner.clone(),
)
}
pub fn get_iap_settings(
&self,
) -> super::builder::identity_aware_proxy_admin_service::GetIapSettings {
super::builder::identity_aware_proxy_admin_service::GetIapSettings::new(self.inner.clone())
}
pub fn update_iap_settings(
&self,
) -> super::builder::identity_aware_proxy_admin_service::UpdateIapSettings {
super::builder::identity_aware_proxy_admin_service::UpdateIapSettings::new(
self.inner.clone(),
)
}
pub fn validate_iap_attribute_expression(
&self,
) -> super::builder::identity_aware_proxy_admin_service::ValidateIapAttributeExpression {
super::builder::identity_aware_proxy_admin_service::ValidateIapAttributeExpression::new(
self.inner.clone(),
)
}
pub fn list_tunnel_dest_groups(
&self,
) -> super::builder::identity_aware_proxy_admin_service::ListTunnelDestGroups {
super::builder::identity_aware_proxy_admin_service::ListTunnelDestGroups::new(
self.inner.clone(),
)
}
pub fn create_tunnel_dest_group(
&self,
) -> super::builder::identity_aware_proxy_admin_service::CreateTunnelDestGroup {
super::builder::identity_aware_proxy_admin_service::CreateTunnelDestGroup::new(
self.inner.clone(),
)
}
pub fn get_tunnel_dest_group(
&self,
) -> super::builder::identity_aware_proxy_admin_service::GetTunnelDestGroup {
super::builder::identity_aware_proxy_admin_service::GetTunnelDestGroup::new(
self.inner.clone(),
)
}
pub fn delete_tunnel_dest_group(
&self,
) -> super::builder::identity_aware_proxy_admin_service::DeleteTunnelDestGroup {
super::builder::identity_aware_proxy_admin_service::DeleteTunnelDestGroup::new(
self.inner.clone(),
)
}
pub fn update_tunnel_dest_group(
&self,
) -> super::builder::identity_aware_proxy_admin_service::UpdateTunnelDestGroup {
super::builder::identity_aware_proxy_admin_service::UpdateTunnelDestGroup::new(
self.inner.clone(),
)
}
}
#[derive(Clone, Debug)]
pub struct IdentityAwareProxyOAuthService {
inner: std::sync::Arc<dyn super::stub::dynamic::IdentityAwareProxyOAuthService>,
}
impl IdentityAwareProxyOAuthService {
pub fn builder() -> super::builder::identity_aware_proxy_o_auth_service::ClientBuilder {
crate::new_client_builder(
super::builder::identity_aware_proxy_o_auth_service::client::Factory,
)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::IdentityAwareProxyOAuthService + '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::IdentityAwareProxyOAuthService>,
> {
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::IdentityAwareProxyOAuthService> {
super::transport::IdentityAwareProxyOAuthService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::IdentityAwareProxyOAuthService> {
Self::build_transport(conf)
.await
.map(super::tracing::IdentityAwareProxyOAuthService::new)
}
pub fn list_brands(&self) -> super::builder::identity_aware_proxy_o_auth_service::ListBrands {
super::builder::identity_aware_proxy_o_auth_service::ListBrands::new(self.inner.clone())
}
pub fn create_brand(&self) -> super::builder::identity_aware_proxy_o_auth_service::CreateBrand {
super::builder::identity_aware_proxy_o_auth_service::CreateBrand::new(self.inner.clone())
}
pub fn get_brand(&self) -> super::builder::identity_aware_proxy_o_auth_service::GetBrand {
super::builder::identity_aware_proxy_o_auth_service::GetBrand::new(self.inner.clone())
}
pub fn create_identity_aware_proxy_client(
&self,
) -> super::builder::identity_aware_proxy_o_auth_service::CreateIdentityAwareProxyClient {
super::builder::identity_aware_proxy_o_auth_service::CreateIdentityAwareProxyClient::new(
self.inner.clone(),
)
}
pub fn list_identity_aware_proxy_clients(
&self,
) -> super::builder::identity_aware_proxy_o_auth_service::ListIdentityAwareProxyClients {
super::builder::identity_aware_proxy_o_auth_service::ListIdentityAwareProxyClients::new(
self.inner.clone(),
)
}
pub fn get_identity_aware_proxy_client(
&self,
) -> super::builder::identity_aware_proxy_o_auth_service::GetIdentityAwareProxyClient {
super::builder::identity_aware_proxy_o_auth_service::GetIdentityAwareProxyClient::new(
self.inner.clone(),
)
}
pub fn reset_identity_aware_proxy_client_secret(
&self,
) -> super::builder::identity_aware_proxy_o_auth_service::ResetIdentityAwareProxyClientSecret
{
super::builder::identity_aware_proxy_o_auth_service::ResetIdentityAwareProxyClientSecret::new(self.inner.clone())
}
pub fn delete_identity_aware_proxy_client(
&self,
) -> super::builder::identity_aware_proxy_o_auth_service::DeleteIdentityAwareProxyClient {
super::builder::identity_aware_proxy_o_auth_service::DeleteIdentityAwareProxyClient::new(
self.inner.clone(),
)
}
}