/*
 * Tapis Applications API
 *
 * The Tapis Applications API provides for management of Tapis applications including permissions.
 *
 * The version of the OpenAPI document: 25Q4.0
 * Contact: cicsupport@tacc.utexas.edu
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReqSubscribe {
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "jobEventCategoryFilter")]
    pub job_event_category_filter: models::JobEventCategoryFilter,
    #[serde(rename = "ttlMinutes", skip_serializing_if = "Option::is_none")]
    pub ttl_minutes: Option<i32>,
    #[serde(rename = "deliveryTargets")]
    pub delivery_targets: Vec<models::NotifDeliveryTarget>,
}

impl ReqSubscribe {
    pub fn new(
        job_event_category_filter: models::JobEventCategoryFilter,
        delivery_targets: Vec<models::NotifDeliveryTarget>,
    ) -> ReqSubscribe {
        ReqSubscribe {
            description: None,
            enabled: None,
            job_event_category_filter,
            ttl_minutes: None,
            delivery_targets,
        }
    }
}
