/*
 * Camunda BPM REST API
 *
 * OpenApi Spec for Camunda BPM REST API.
 *
 * The version of the OpenAPI document: 7.14.0
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct IncidentDto {
    /// The id of the incident.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The id of the process definition this incident is associated with.
    #[serde(rename = "processDefinitionId", skip_serializing_if = "Option::is_none")]
    pub process_definition_id: Option<String>,
    /// The id of the process instance this incident is associated with.
    #[serde(rename = "processInstanceId", skip_serializing_if = "Option::is_none")]
    pub process_instance_id: Option<String>,
    /// The id of the execution this incident is associated with.
    #[serde(rename = "executionId", skip_serializing_if = "Option::is_none")]
    pub execution_id: Option<String>,
    /// The time this incident happened. By [default](https://docs.camunda.org/manual/7.14/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`.
    #[serde(rename = "incidentTimestamp", skip_serializing_if = "Option::is_none")]
    pub incident_timestamp: Option<String>,
    /// The type of incident, for example: `failedJobs` will be returned in case of an incident which identified a failed job during the execution of a process instance. See the [User Guide](https://docs.camunda.org/manual/7.14/user-guide/process-engine/incidents/#incident-types) for a list of incident types.
    #[serde(rename = "incidentType", skip_serializing_if = "Option::is_none")]
    pub incident_type: Option<String>,
    /// The id of the activity this incident is associated with.
    #[serde(rename = "activityId", skip_serializing_if = "Option::is_none")]
    pub activity_id: Option<String>,
    /// The id of the activity on which the last exception occurred.
    #[serde(rename = "failedActivityId", skip_serializing_if = "Option::is_none")]
    pub failed_activity_id: Option<String>,
    /// The id of the associated cause incident which has been triggered.
    #[serde(rename = "causeIncidentId", skip_serializing_if = "Option::is_none")]
    pub cause_incident_id: Option<String>,
    /// The id of the associated root cause incident which has been triggered.
    #[serde(rename = "rootCauseIncidentId", skip_serializing_if = "Option::is_none")]
    pub root_cause_incident_id: Option<String>,
    /// The payload of this incident.
    #[serde(rename = "configuration", skip_serializing_if = "Option::is_none")]
    pub configuration: Option<String>,
    /// The id of the tenant this incident is associated with.
    #[serde(rename = "tenantId", skip_serializing_if = "Option::is_none")]
    pub tenant_id: Option<String>,
    /// The message of this incident.
    #[serde(rename = "incidentMessage", skip_serializing_if = "Option::is_none")]
    pub incident_message: Option<String>,
    /// The job definition id the incident is associated with.
    #[serde(rename = "jobDefinitionId", skip_serializing_if = "Option::is_none")]
    pub job_definition_id: Option<String>,
}

impl IncidentDto {
    pub fn new() -> IncidentDto {
        IncidentDto {
            id: None,
            process_definition_id: None,
            process_instance_id: None,
            execution_id: None,
            incident_timestamp: None,
            incident_type: None,
            activity_id: None,
            failed_activity_id: None,
            cause_incident_id: None,
            root_cause_incident_id: None,
            configuration: None,
            tenant_id: None,
            incident_message: None,
            job_definition_id: None,
        }
    }
}


