use crate::Result;
#[derive(Clone, Debug)]
pub struct IAMPolicy<T>
where
T: super::stub::IAMPolicy + std::fmt::Debug + Send + Sync,
{
inner: T,
}
impl<T> IAMPolicy<T>
where
T: super::stub::IAMPolicy + std::fmt::Debug + Send + Sync,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
impl<T> super::stub::IAMPolicy for IAMPolicy<T>
where
T: super::stub::IAMPolicy + std::fmt::Debug + Send + Sync,
{
#[tracing::instrument(ret)]
async fn set_iam_policy(
&self,
req: crate::model::SetIamPolicyRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Policy>> {
self.inner.set_iam_policy(req, options).await
}
#[tracing::instrument(ret)]
async fn get_iam_policy(
&self,
req: crate::model::GetIamPolicyRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Policy>> {
self.inner.get_iam_policy(req, options).await
}
#[tracing::instrument(ret)]
async fn test_iam_permissions(
&self,
req: crate::model::TestIamPermissionsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::TestIamPermissionsResponse>> {
self.inner.test_iam_permissions(req, options).await
}
}