/*
 * Streams API
 *
 * Manage Tapis Streams API.
 *
 * The version of the OpenAPI document: 1
 * 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 Deadman {
    #[serde(rename = "key")]
    pub key: String,
    #[serde(rename = "every", skip_serializing_if = "Option::is_none")]
    pub every: Option<String>,
    #[serde(rename = "offset", skip_serializing_if = "Option::is_none")]
    pub offset: Option<String>,
    #[serde(rename = "report_zero", skip_serializing_if = "Option::is_none")]
    pub report_zero: Option<bool>,
    #[serde(rename = "time_since")]
    pub time_since: String,
    #[serde(rename = "stale_time", skip_serializing_if = "Option::is_none")]
    pub stale_time: Option<String>,
}

impl Deadman {
    pub fn new(key: String, time_since: String) -> Deadman {
        Deadman {
            key,
            every: None,
            offset: None,
            report_zero: None,
            time_since,
            stale_time: None,
        }
    }
}
