trieve_client/models/
recommendation_ctr_metrics.rs

1/*
2 * Trieve API
3 *
4 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5 *
6 * The version of the OpenAPI document: 0.11.7
7 * Contact: developers@trieve.ai
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct RecommendationCtrMetrics {
15    #[serde(rename = "avg_position_of_click")]
16    pub avg_position_of_click: f64,
17    #[serde(rename = "percent_recommendations_with_clicks")]
18    pub percent_recommendations_with_clicks: f64,
19    #[serde(rename = "recommendations_with_clicks")]
20    pub recommendations_with_clicks: i64,
21}
22
23impl RecommendationCtrMetrics {
24    pub fn new(avg_position_of_click: f64, percent_recommendations_with_clicks: f64, recommendations_with_clicks: i64) -> RecommendationCtrMetrics {
25        RecommendationCtrMetrics {
26            avg_position_of_click,
27            percent_recommendations_with_clicks,
28            recommendations_with_clicks,
29        }
30    }
31}
32