trieve-client 0.11.7

Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
Documentation
/*
 * Trieve API
 *
 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
 *
 * The version of the OpenAPI document: 0.11.7
 * Contact: developers@trieve.ai
 * Generated by: https://openapi-generator.tech
 */

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SearchCtrMetrics {
    #[serde(rename = "avg_position_of_click")]
    pub avg_position_of_click: f64,
    #[serde(rename = "percent_searches_with_clicks")]
    pub percent_searches_with_clicks: f64,
    #[serde(rename = "percent_searches_without_clicks")]
    pub percent_searches_without_clicks: f64,
    #[serde(rename = "searches_with_clicks")]
    pub searches_with_clicks: i64,
}

impl SearchCtrMetrics {
    pub fn new(avg_position_of_click: f64, percent_searches_with_clicks: f64, percent_searches_without_clicks: f64, searches_with_clicks: i64) -> SearchCtrMetrics {
        SearchCtrMetrics {
            avg_position_of_click,
            percent_searches_with_clicks,
            percent_searches_without_clicks,
            searches_with_clicks,
        }
    }
}