/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.2.1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateEmailSubscriptionRequest {
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    /// Event-type tokens to listen for. Must be drawn from `VALID_EVENT_TYPES`.
    #[serde(rename = "event_types")]
    pub event_types: Vec<String>,
    /// Email addresses to deliver matching events to. Bounded length; see `MAX_RECIPIENTS_PER_SUBSCRIPTION` for the operator-facing limit.
    #[serde(rename = "recipients")]
    pub recipients: Vec<String>,
}

impl CreateEmailSubscriptionRequest {
    pub fn new(event_types: Vec<String>, recipients: Vec<String>) -> CreateEmailSubscriptionRequest {
        CreateEmailSubscriptionRequest {
            enabled: None,
            event_types,
            recipients,
        }
    }
}

