jira2/models/
jira_expression_validation_error.rs

1/*
2 * The Jira Cloud platform REST API
3 *
4 * Jira Cloud platform REST API documentation
5 *
6 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
7 * Contact: ecosystem@atlassian.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// JiraExpressionValidationError : Details about syntax and type errors. The error details apply to the entire expression, unless the object includes:   *  `line` and `column`  *  `expression`
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct JiraExpressionValidationError {
17    /// The text line in which the error occurred.
18    #[serde(rename = "line", skip_serializing_if = "Option::is_none")]
19    pub line: Option<i32>,
20    /// The text column in which the error occurred.
21    #[serde(rename = "column", skip_serializing_if = "Option::is_none")]
22    pub column: Option<i32>,
23    /// The part of the expression in which the error occurred.
24    #[serde(rename = "expression", skip_serializing_if = "Option::is_none")]
25    pub expression: Option<String>,
26    /// Details about the error.
27    #[serde(rename = "message")]
28    pub message: String,
29    /// The error type.
30    #[serde(rename = "type")]
31    pub _type: Type,
32}
33
34impl JiraExpressionValidationError {
35    /// Details about syntax and type errors. The error details apply to the entire expression, unless the object includes:   *  `line` and `column`  *  `expression`
36    pub fn new(message: String, _type: Type) -> JiraExpressionValidationError {
37        JiraExpressionValidationError {
38            line: None,
39            column: None,
40            expression: None,
41            message,
42            _type,
43        }
44    }
45}
46
47/// The error type.
48#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
49pub enum Type {
50    #[serde(rename = "syntax")]
51    Syntax,
52    #[serde(rename = "type")]
53    _Type,
54    #[serde(rename = "other")]
55    Other,
56}
57
58impl Default for Type {
59    fn default() -> Type {
60        Self::Syntax
61    }
62}
63