jira/gen/models/
jira_expression_complexity.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/// JiraExpressionComplexity : Details about the complexity of the analysed Jira expression.
12
13#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14pub struct JiraExpressionComplexity {
15    /// Information that can be used to determine how many [expensive operations](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#expensive-operations) the evaluation of the expression will perform. This information may be a formula or number. For example:   *  `issues.map(i => i.comments)` performs as many expensive operations as there are issues on the issues list. So this parameter returns `N`, where `N` is the size of issue list.  *  `new Issue(10010).comments` gets comments for one issue, so its complexity is `2` (`1` to retrieve issue 10010 from the database plus `1` to get its comments).
16    #[serde(rename = "expensiveOperations")]
17    pub expensive_operations: String,
18    /// Variables used in the formula, mapped to the parts of the expression they refer to.
19    #[serde(rename = "variables", skip_serializing_if = "Option::is_none")]
20    pub variables: Option<::std::collections::HashMap<String, String>>,
21}
22
23impl JiraExpressionComplexity {
24    /// Details about the complexity of the analysed Jira expression.
25    pub fn new(expensive_operations: String) -> JiraExpressionComplexity {
26        JiraExpressionComplexity {
27            expensive_operations,
28            variables: None,
29        }
30    }
31}