/// Creates a new data instance for a lifecycle event.
Creates a new data instance for a lifecycle event.
Creates a new data instance for a lifecycle event .
pub fn for_lifecycle_event(
        moniker: impl Into<String>,
        lifecycle_event_type: LifecycleType,
        payload: Option<DiagnosticsHierarchy>,
        component_url: impl Into<String>,
        timestamp: impl Into<Timestamp>,
        errors: Vec<Error>,
    ) -> LifecycleData {
        let errors_opt = if errors.is_empty() { None } else { Some(errors) };
        Data {
            moniker: moniker.into(),
            version: SCHEMA_VERSION,
            data_source: DataSource::LifecycleEvent,
            payload,
            metadata: LifecycleEventMetadata {
                timestamp: timestamp.into(),
                component_url: component_url.into(),
                lifecycle_event_type,
                errors: errors_opt,
            },
        }
    }
pub fn for_lifecycle_event ( moniker : impl Into < String > , lifecycle_event_type : LifecycleType , payload : Option < DiagnosticsHierarchy > , component_url : impl Into < String > , timestamp : impl Into < Timestamp > , errors : Vec < Error > , ) -> LifecycleData { let errors_opt = if errors . is_empty ( ) { None } else { Some ( errors ) } ; Data { moniker : moniker . into ( ) , version : SCHEMA_VERSION , data_source : DataSource :: LifecycleEvent , payload , metadata : LifecycleEventMetadata { timestamp : timestamp . into ( ) , component_url : component_url . into ( ) , lifecycle_event_type , errors : errors_opt , } , } }
Creates a new data instance for a lifecycle event.
Creates a new data instance for a lifecycle event .
moniker
impl Into<String>
lifecycle_event_type
LifecycleType
payload
Option<DiagnosticsHierarchy>
component_url
impl Into<String>
timestamp
impl Into<Timestamp>
errors
Vec<Error>