Skip to main content

hanzo_client/models/
captured_error.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CapturedError {
16    /// DistinctID is the person/visitor the error is attributed to. Omitted when the row carries none.
17    #[serde(rename = "distinctId", skip_serializing_if = "Option::is_none")]
18    pub distinct_id: Option<String>,
19    /// Event is the event name the error was stored under, e.g. $error.
20    #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
21    pub event: Option<String>,
22    #[serde(rename = "exception", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub exception: Option<Option<serde_json::Value>>,
24    /// ID is the row's stable event id — the client's own idempotency id when it sent one, else the server-minted one.
25    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
26    pub id: Option<String>,
27    /// Library is the client SDK that reported the error. Omitted when absent.
28    #[serde(rename = "library", skip_serializing_if = "Option::is_none")]
29    pub library: Option<String>,
30    /// LibraryVer is that SDK's version. Omitted when absent.
31    #[serde(rename = "libraryVersion", skip_serializing_if = "Option::is_none")]
32    pub library_version: Option<String>,
33    /// Path is the URL's path component. Omitted when absent.
34    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
35    pub path: Option<String>,
36    /// Product is the surface that emitted the error. Omitted when absent.
37    #[serde(rename = "product", skip_serializing_if = "Option::is_none")]
38    pub product: Option<String>,
39    #[serde(rename = "properties", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
40    pub properties: Option<Option<serde_json::Value>>,
41    /// SessionID groups the events of one visit. Omitted when the client sent none.
42    #[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
43    pub session_id: Option<String>,
44    /// Timestamp is when the error was captured, RFC3339 UTC.
45    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
46    pub timestamp: Option<String>,
47    /// URL is the full page address the error fired on. Omitted when absent.
48    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
49    pub url: Option<String>,
50}
51
52impl CapturedError {
53    pub fn new() -> CapturedError {
54        CapturedError {
55            distinct_id: None,
56            event: None,
57            exception: None,
58            id: None,
59            library: None,
60            library_version: None,
61            path: None,
62            product: None,
63            properties: None,
64            session_id: None,
65            timestamp: None,
66            url: None,
67        }
68    }
69}
70