jira_api_v2/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
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// JiraExpressionComplexity : Details about the complexity of the analysed Jira expression.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct JiraExpressionComplexity {
17 /// 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).
18 #[serde(rename = "expensiveOperations")]
19 pub expensive_operations: String,
20 /// Variables used in the formula, mapped to the parts of the expression they refer to.
21 #[serde(rename = "variables", skip_serializing_if = "Option::is_none")]
22 pub variables: Option<std::collections::HashMap<String, String>>,
23}
24
25impl JiraExpressionComplexity {
26 /// Details about the complexity of the analysed Jira expression.
27 pub fn new(expensive_operations: String) -> JiraExpressionComplexity {
28 JiraExpressionComplexity {
29 expensive_operations,
30 variables: None,
31 }
32 }
33}
34