use crate::Result;
#[derive(Clone, Debug)]
pub struct Recommender<T>
where
T: super::stub::Recommender + std::fmt::Debug + Send + Sync,
{
inner: T,
}
impl<T> Recommender<T>
where
T: super::stub::Recommender + std::fmt::Debug + Send + Sync,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
impl<T> super::stub::Recommender for Recommender<T>
where
T: super::stub::Recommender + std::fmt::Debug + Send + Sync,
{
#[tracing::instrument(ret)]
async fn list_insights(
&self,
req: crate::model::ListInsightsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListInsightsResponse>> {
self.inner.list_insights(req, options).await
}
#[tracing::instrument(ret)]
async fn get_insight(
&self,
req: crate::model::GetInsightRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Insight>> {
self.inner.get_insight(req, options).await
}
#[tracing::instrument(ret)]
async fn mark_insight_accepted(
&self,
req: crate::model::MarkInsightAcceptedRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Insight>> {
self.inner.mark_insight_accepted(req, options).await
}
#[tracing::instrument(ret)]
async fn list_recommendations(
&self,
req: crate::model::ListRecommendationsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListRecommendationsResponse>> {
self.inner.list_recommendations(req, options).await
}
#[tracing::instrument(ret)]
async fn get_recommendation(
&self,
req: crate::model::GetRecommendationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Recommendation>> {
self.inner.get_recommendation(req, options).await
}
#[tracing::instrument(ret)]
async fn mark_recommendation_dismissed(
&self,
req: crate::model::MarkRecommendationDismissedRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Recommendation>> {
self.inner.mark_recommendation_dismissed(req, options).await
}
#[tracing::instrument(ret)]
async fn mark_recommendation_claimed(
&self,
req: crate::model::MarkRecommendationClaimedRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Recommendation>> {
self.inner.mark_recommendation_claimed(req, options).await
}
#[tracing::instrument(ret)]
async fn mark_recommendation_succeeded(
&self,
req: crate::model::MarkRecommendationSucceededRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Recommendation>> {
self.inner.mark_recommendation_succeeded(req, options).await
}
#[tracing::instrument(ret)]
async fn mark_recommendation_failed(
&self,
req: crate::model::MarkRecommendationFailedRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Recommendation>> {
self.inner.mark_recommendation_failed(req, options).await
}
#[tracing::instrument(ret)]
async fn get_recommender_config(
&self,
req: crate::model::GetRecommenderConfigRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::RecommenderConfig>> {
self.inner.get_recommender_config(req, options).await
}
#[tracing::instrument(ret)]
async fn update_recommender_config(
&self,
req: crate::model::UpdateRecommenderConfigRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::RecommenderConfig>> {
self.inner.update_recommender_config(req, options).await
}
#[tracing::instrument(ret)]
async fn get_insight_type_config(
&self,
req: crate::model::GetInsightTypeConfigRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::InsightTypeConfig>> {
self.inner.get_insight_type_config(req, options).await
}
#[tracing::instrument(ret)]
async fn update_insight_type_config(
&self,
req: crate::model::UpdateInsightTypeConfigRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::InsightTypeConfig>> {
self.inner.update_insight_type_config(req, options).await
}
}