autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Event Destinations
 *
 * The Stedi Events Service manages event destinations and event delivery. It supports destination CRUD operations, secret management for signature verification, event creation and management, and delivery tracking with resend capabilities. 
 *
 * The version of the OpenAPI document: 2026-02-01
 * Contact: healthcare@stedi.com
 * Generated by: https://openapi-generator.tech
 */

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

/// EventSummary : A summary representation of an event, returned in list responses.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EventSummary {
    /// An ISO 8601 timestamp of when the event was created.
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::FixedOffset>,
    /// The type of event, such as `enrollment.activated`.
    #[serde(rename = "eventType")]
    pub event_type: String,
    /// The unique identifier for the event, formatted as `evt_{UUID}`.
    #[serde(rename = "id")]
    pub id: String,
    /// The current status of the event. Can be:   - `DELIVERED`: Stedi successfully delivered the event to all relevant event destinations.   - `PENDING`: Stedi is still trying to deliver the event to one or more event destinations. Events may stay in this state for multiple days as Stedi automatically retries.   - `FAILED`: Stedi couldn't deliver the event to at least one event destination and is no longer retrying.  Deliveries to some event destinations may have been successful.
    #[serde(rename = "status")]
    pub status: models::EventStatus,
}

impl EventSummary {
    /// A summary representation of an event, returned in list responses.
    pub fn new(created_at: chrono::DateTime<chrono::FixedOffset>, event_type: String, id: String, status: models::EventStatus) -> EventSummary {
        EventSummary {
            created_at,
            event_type,
            id,
            status,
        }
    }
}