1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Orvanta API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.7.0
* Contact: contact@orvanta.cloud
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// LogSearchHit : A matched service-log line. `document` is Tantivy's native `{field: [values, ...]}` shape, with keys `host`, `mode`, `worker_group`, `file_name`, `line_number`, `timestamp`, `json_fmt`, `logs`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LogSearchHit {
#[serde(rename = "document", skip_serializing_if = "Option::is_none")]
pub document: Option<serde_json::Value>,
/// Plain-text excerpt around the match, if a snippet could be generated.
#[serde(rename = "snippet_fragment", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub snippet_fragment: Option<Option<String>>,
/// Character ranges within `snippet_fragment` to highlight.
#[serde(rename = "snippet_highlighted", skip_serializing_if = "Option::is_none")]
pub snippet_highlighted: Option<Vec<models::LogSearchHitSnippetHighlightedInner>>,
}
impl LogSearchHit {
/// A matched service-log line. `document` is Tantivy's native `{field: [values, ...]}` shape, with keys `host`, `mode`, `worker_group`, `file_name`, `line_number`, `timestamp`, `json_fmt`, `logs`.
pub fn new() -> LogSearchHit {
LogSearchHit {
document: None,
snippet_fragment: None,
snippet_highlighted: None,
}
}
}