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};

/// DestinationSummary : A summary representation of a destination, returned in list responses.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DestinationSummary {
    /// The maximum number of concurrent deliveries for this destination. Contact Stedi to change your account limits.
    #[serde(rename = "concurrencyLimit", skip_serializing_if = "Option::is_none")]
    pub concurrency_limit: Option<f64>,
    /// Creation timestamp for this destination.
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::FixedOffset>,
    /// A description of the destination's purpose, such as \"Receives transaction enrollment task notifications.\"
    #[serde(rename = "description")]
    pub description: String,
    /// The URL where Stedi delivers payloads through HTTP `POST`.
    #[serde(rename = "destinationUrl")]
    pub destination_url: String,
    /// The event types Stedi sends to this destination. Visit [event types](https://www.stedi.com/docs/healthcare/event-destinations-event-types) for a complete list.
    #[serde(rename = "eventTypes")]
    pub event_types: Vec<String>,
    /// The unique identifier for the destination.
    #[serde(rename = "id")]
    pub id: String,
    /// The timestamp for Stedi's most recent delivery attempt to this destination. Absent when Stedi hasn't yet attempted a delivery.
    #[serde(rename = "lastDeliveryTime", skip_serializing_if = "Option::is_none")]
    pub last_delivery_time: Option<chrono::DateTime<chrono::FixedOffset>>,
    /// A human-readable name for the destination. Stedi displays this name in the portal.
    #[serde(rename = "name")]
    pub name: String,
    /// The destination's current status. Stedi only sends event payloads to `ENABLED` destinations.
    #[serde(rename = "status")]
    pub status: models::DestinationStatus,
    /// Last update timestamp for this destination.
    #[serde(rename = "updatedAt")]
    pub updated_at: chrono::DateTime<chrono::FixedOffset>,
}

impl DestinationSummary {
    /// A summary representation of a destination, returned in list responses.
    pub fn new(created_at: chrono::DateTime<chrono::FixedOffset>, description: String, destination_url: String, event_types: Vec<String>, id: String, name: String, status: models::DestinationStatus, updated_at: chrono::DateTime<chrono::FixedOffset>) -> DestinationSummary {
        DestinationSummary {
            concurrency_limit: None,
            created_at,
            description,
            destination_url,
            event_types,
            id,
            last_delivery_time: None,
            name,
            status,
            updated_at,
        }
    }
}