Skip to main content

orvanta_api/models/
job_search_hit.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.0.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// JobSearchHit : A matched completed run. `document` is Tantivy's native `{field: [values, ...]}` shape (every field is multi-valued), with keys `id`, `workspace_id`, `script_path`, `success`, `created_at`.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct JobSearchHit {
17    #[serde(rename = "document", skip_serializing_if = "Option::is_none")]
18    pub document: Option<serde_json::Value>,
19    /// Stable per-hit id (the job id) for selection/dedup in the UI.
20    #[serde(rename = "search_id", skip_serializing_if = "Option::is_none")]
21    pub search_id: Option<String>,
22}
23
24impl JobSearchHit {
25    /// A matched completed run. `document` is Tantivy's native `{field: [values, ...]}` shape (every field is multi-valued), with keys `id`, `workspace_id`, `script_path`, `success`, `created_at`.
26    pub fn new() -> JobSearchHit {
27        JobSearchHit {
28            document: None,
29            search_id: None,
30        }
31    }
32}
33