use crate::Result;
#[derive(Clone, Debug)]
pub struct PrivilegedAccessManager<T>
where
T: super::stub::PrivilegedAccessManager + std::fmt::Debug + Send + Sync,
{
inner: T,
}
impl<T> PrivilegedAccessManager<T>
where
T: super::stub::PrivilegedAccessManager + std::fmt::Debug + Send + Sync,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
impl<T> super::stub::PrivilegedAccessManager for PrivilegedAccessManager<T>
where
T: super::stub::PrivilegedAccessManager + std::fmt::Debug + Send + Sync,
{
#[tracing::instrument(ret)]
async fn check_onboarding_status(
&self,
req: crate::model::CheckOnboardingStatusRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::CheckOnboardingStatusResponse>> {
self.inner.check_onboarding_status(req, options).await
}
#[tracing::instrument(ret)]
async fn list_entitlements(
&self,
req: crate::model::ListEntitlementsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListEntitlementsResponse>> {
self.inner.list_entitlements(req, options).await
}
#[tracing::instrument(ret)]
async fn search_entitlements(
&self,
req: crate::model::SearchEntitlementsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::SearchEntitlementsResponse>> {
self.inner.search_entitlements(req, options).await
}
#[tracing::instrument(ret)]
async fn get_entitlement(
&self,
req: crate::model::GetEntitlementRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Entitlement>> {
self.inner.get_entitlement(req, options).await
}
#[tracing::instrument(ret)]
async fn create_entitlement(
&self,
req: crate::model::CreateEntitlementRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.create_entitlement(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_entitlement(
&self,
req: crate::model::DeleteEntitlementRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.delete_entitlement(req, options).await
}
#[tracing::instrument(ret)]
async fn update_entitlement(
&self,
req: crate::model::UpdateEntitlementRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.update_entitlement(req, options).await
}
#[tracing::instrument(ret)]
async fn list_grants(
&self,
req: crate::model::ListGrantsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListGrantsResponse>> {
self.inner.list_grants(req, options).await
}
#[tracing::instrument(ret)]
async fn search_grants(
&self,
req: crate::model::SearchGrantsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::SearchGrantsResponse>> {
self.inner.search_grants(req, options).await
}
#[tracing::instrument(ret)]
async fn get_grant(
&self,
req: crate::model::GetGrantRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Grant>> {
self.inner.get_grant(req, options).await
}
#[tracing::instrument(ret)]
async fn create_grant(
&self,
req: crate::model::CreateGrantRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Grant>> {
self.inner.create_grant(req, options).await
}
#[tracing::instrument(ret)]
async fn approve_grant(
&self,
req: crate::model::ApproveGrantRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Grant>> {
self.inner.approve_grant(req, options).await
}
#[tracing::instrument(ret)]
async fn deny_grant(
&self,
req: crate::model::DenyGrantRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Grant>> {
self.inner.deny_grant(req, options).await
}
#[tracing::instrument(ret)]
async fn revoke_grant(
&self,
req: crate::model::RevokeGrantRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.revoke_grant(req, options).await
}
#[tracing::instrument(ret)]
async fn list_locations(
&self,
req: google_cloud_location::model::ListLocationsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_location::model::ListLocationsResponse>> {
self.inner.list_locations(req, options).await
}
#[tracing::instrument(ret)]
async fn get_location(
&self,
req: google_cloud_location::model::GetLocationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_location::model::Location>> {
self.inner.get_location(req, options).await
}
#[tracing::instrument(ret)]
async fn list_operations(
&self,
req: google_cloud_longrunning::model::ListOperationsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::ListOperationsResponse>> {
self.inner.list_operations(req, options).await
}
#[tracing::instrument(ret)]
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.get_operation(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_operation(
&self,
req: google_cloud_longrunning::model::DeleteOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.delete_operation(req, options).await
}
fn get_polling_error_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
self.inner.get_polling_error_policy(options)
}
fn get_polling_backoff_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
self.inner.get_polling_backoff_policy(options)
}
}