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 RecommendationEvent {
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "dataset_id")]
    pub dataset_id: uuid::Uuid,
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "negative_ids")]
    pub negative_ids: Vec<uuid::Uuid>,
    #[serde(rename = "negative_tracking_ids")]
    pub negative_tracking_ids: Vec<String>,
    #[serde(rename = "positive_ids")]
    pub positive_ids: Vec<uuid::Uuid>,
    #[serde(rename = "positive_tracking_ids")]
    pub positive_tracking_ids: Vec<String>,
    #[serde(rename = "recommendation_type")]
    pub recommendation_type: String,
    #[serde(rename = "request_params", deserialize_with = "Option::deserialize")]
    pub request_params: Option<serde_json::Value>,
    #[serde(rename = "results")]
    pub results: Vec<serde_json::Value>,
    #[serde(rename = "top_score")]
    pub top_score: f32,
    #[serde(rename = "user_id")]
    pub user_id: String,
}

impl RecommendationEvent {
    pub fn new(created_at: String, dataset_id: uuid::Uuid, id: uuid::Uuid, negative_ids: Vec<uuid::Uuid>, negative_tracking_ids: Vec<String>, positive_ids: Vec<uuid::Uuid>, positive_tracking_ids: Vec<String>, recommendation_type: String, request_params: Option<serde_json::Value>, results: Vec<serde_json::Value>, top_score: f32, user_id: String) -> RecommendationEvent {
        RecommendationEvent {
            created_at,
            dataset_id,
            id,
            negative_ids,
            negative_tracking_ids,
            positive_ids,
            positive_tracking_ids,
            recommendation_type,
            request_params,
            results,
            top_score,
            user_id,
        }
    }
}