/*
 * The Jira Cloud platform REST API
 *
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT-48dd1e2d75e7eac65741e465279d2700f927137d
 * Contact: ecosystem@atlassian.com
 * Generated by: https://openapi-generator.tech
 */

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

/// WorkflowElementReference : A reference to the location of the error. This will be null if the error does not refer to a specific element.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkflowElementReference {
    /// A property key.
    #[serde(rename = "propertyKey", skip_serializing_if = "Option::is_none")]
    pub property_key: Option<String>,
    /// A rule ID.
    #[serde(rename = "ruleId", skip_serializing_if = "Option::is_none")]
    pub rule_id: Option<String>,
    #[serde(rename = "statusMappingReference", skip_serializing_if = "Option::is_none")]
    pub status_mapping_reference: Option<Box<models::ProjectAndIssueTypePair>>,
    /// A status reference.
    #[serde(rename = "statusReference", skip_serializing_if = "Option::is_none")]
    pub status_reference: Option<String>,
    /// A transition ID.
    #[serde(rename = "transitionId", skip_serializing_if = "Option::is_none")]
    pub transition_id: Option<String>,
}

impl WorkflowElementReference {
    /// A reference to the location of the error. This will be null if the error does not refer to a specific element.
    pub fn new() -> WorkflowElementReference {
        WorkflowElementReference {
            property_key: None,
            rule_id: None,
            status_mapping_reference: None,
            status_reference: None,
            transition_id: None,
        }
    }
}

