use crate::Result;
#[derive(Clone, Debug)]
pub struct Operations<T>
where
T: super::stub::Operations + std::fmt::Debug + Send + Sync,
{
inner: T,
}
impl<T> Operations<T>
where
T: super::stub::Operations + std::fmt::Debug + Send + Sync,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
impl<T> super::stub::Operations for Operations<T>
where
T: super::stub::Operations + std::fmt::Debug + Send + Sync,
{
#[tracing::instrument(ret)]
async fn list_operations(
&self,
req: crate::model::ListOperationsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListOperationsResponse>> {
self.inner.list_operations(req, options).await
}
#[tracing::instrument(ret)]
async fn get_operation(
&self,
req: crate::model::GetOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Operation>> {
self.inner.get_operation(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_operation(
&self,
req: crate::model::DeleteOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.delete_operation(req, options).await
}
#[tracing::instrument(ret)]
async fn cancel_operation(
&self,
req: crate::model::CancelOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.cancel_operation(req, options).await
}
}