netbox_openapi/models/
patched_config_template_request.rs

1/*
2 * NetBox REST API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.4.2-Docker-3.4.1 (4.4)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PatchedConfigTemplateRequest : Introduces support for Tag assignment. Adds `tags` serialization, and handles tag assignment on create() and update().
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedConfigTemplateRequest {
15    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
16    pub name: Option<String>,
17    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
18    pub description: Option<String>,
19    /// Any additional parameters (<https://jinja.palletsprojects.com/en/stable/api/#jinja2.Environment>) to pass when constructing the Jinja environment
20    #[serde(
21        rename = "environment_params",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub environment_params: Option<Option<serde_json::Value>>,
27    /// Jinja template code.
28    #[serde(rename = "template_code", skip_serializing_if = "Option::is_none")]
29    pub template_code: Option<String>,
30    /// Defaults to <code>text/plain; charset=utf-8</code>
31    #[serde(rename = "mime_type", skip_serializing_if = "Option::is_none")]
32    pub mime_type: Option<String>,
33    /// Filename to give to the rendered export file
34    #[serde(rename = "file_name", skip_serializing_if = "Option::is_none")]
35    pub file_name: Option<String>,
36    /// Extension to append to the rendered filename
37    #[serde(rename = "file_extension", skip_serializing_if = "Option::is_none")]
38    pub file_extension: Option<String>,
39    /// Download file as attachment
40    #[serde(rename = "as_attachment", skip_serializing_if = "Option::is_none")]
41    pub as_attachment: Option<bool>,
42    #[serde(rename = "data_source", skip_serializing_if = "Option::is_none")]
43    pub data_source: Option<Box<crate::models::ConfigContextProfileRequestDataSource>>,
44    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
45    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
46}
47
48impl PatchedConfigTemplateRequest {
49    /// Introduces support for Tag assignment. Adds `tags` serialization, and handles tag assignment on create() and update().
50    pub fn new() -> PatchedConfigTemplateRequest {
51        PatchedConfigTemplateRequest {
52            name: None,
53            description: None,
54            environment_params: None,
55            template_code: None,
56            mime_type: None,
57            file_name: None,
58            file_extension: None,
59            as_attachment: None,
60            data_source: None,
61            tags: None,
62        }
63    }
64}