jira-api-v2 1.0.1

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

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

/// FieldUpdateOperation : Details of an operation to perform on a field.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FieldUpdateOperation {
    /// A map containing the name of a field and the value to add to it.
    #[serde(rename = "add", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub add: Option<Option<serde_json::Value>>,
    /// A map containing the name of a field and the value to set in it.
    #[serde(rename = "set", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub set: Option<Option<serde_json::Value>>,
    /// A map containing the name of a field and the value to removed from it.
    #[serde(rename = "remove", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub remove: Option<Option<serde_json::Value>>,
    /// A map containing the name of a field and the value to edit in it.
    #[serde(rename = "edit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub edit: Option<Option<serde_json::Value>>,
}

impl FieldUpdateOperation {
    /// Details of an operation to perform on a field.
    pub fn new() -> FieldUpdateOperation {
        FieldUpdateOperation {
            add: None,
            set: None,
            remove: None,
            edit: None,
        }
    }
}