hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * 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/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CapturedError {
    /// DistinctID is the person/visitor the error is attributed to. Omitted when the row carries none.
    #[serde(rename = "distinctId", skip_serializing_if = "Option::is_none")]
    pub distinct_id: Option<String>,
    /// Event is the event name the error was stored under, e.g. $error.
    #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
    pub event: Option<String>,
    #[serde(rename = "exception", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub exception: Option<Option<serde_json::Value>>,
    /// ID is the row's stable event id — the client's own idempotency id when it sent one, else the server-minted one.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Library is the client SDK that reported the error. Omitted when absent.
    #[serde(rename = "library", skip_serializing_if = "Option::is_none")]
    pub library: Option<String>,
    /// LibraryVer is that SDK's version. Omitted when absent.
    #[serde(rename = "libraryVersion", skip_serializing_if = "Option::is_none")]
    pub library_version: Option<String>,
    /// Path is the URL's path component. Omitted when absent.
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
    /// Product is the surface that emitted the error. Omitted when absent.
    #[serde(rename = "product", skip_serializing_if = "Option::is_none")]
    pub product: Option<String>,
    #[serde(rename = "properties", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub properties: Option<Option<serde_json::Value>>,
    /// SessionID groups the events of one visit. Omitted when the client sent none.
    #[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
    pub session_id: Option<String>,
    /// Timestamp is when the error was captured, RFC3339 UTC.
    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
    /// URL is the full page address the error fired on. Omitted when absent.
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

impl CapturedError {
    pub fn new() -> CapturedError {
        CapturedError {
            distinct_id: None,
            event: None,
            exception: None,
            id: None,
            library: None,
            library_version: None,
            path: None,
            product: None,
            properties: None,
            session_id: None,
            timestamp: None,
            url: None,
        }
    }
}