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

/// EventDestinationsCreateDestinationRequestContent : Input for creating a new destination.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EventDestinationsCreateDestinationRequestContent {
    /// Maximum concurrent deliveries for this destination. If not set, Stedi applies your account default (typically 5). Stedi rejects requests exceeding your account maximum (typically 20) with a `400` error. Contact Stedi to change your limits.
    #[serde(rename = "concurrencyLimit", skip_serializing_if = "Option::is_none")]
    pub concurrency_limit: Option<f64>,
    /// A description of the destination's purpose, such as \"Receives transaction enrollment task notifications.\"
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// The URL where you want Stedi to deliver payloads through HTTP `POST`.
    #[serde(rename = "destinationUrl")]
    pub destination_url: String,
    /// The event types you want Stedi to send 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>,
    /// A human-readable name for the destination. Stedi displays this name in the portal.
    #[serde(rename = "name")]
    pub name: String,
    /// The destination's status upon creation. Default is `ENABLED`.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<models::DestinationInputStatus>,
}

impl EventDestinationsCreateDestinationRequestContent {
    /// Input for creating a new destination.
    pub fn new(destination_url: String, event_types: Vec<String>, name: String) -> EventDestinationsCreateDestinationRequestContent {
        EventDestinationsCreateDestinationRequestContent {
            concurrency_limit: None,
            description: None,
            destination_url,
            event_types,
            name,
            status: None,
        }
    }
}