netbox_openapi/models/
patched_export_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/// PatchedExportTemplateRequest : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see <https://github.com/encode/django-rest-framework/issues/3144>)
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedExportTemplateRequest {
15    #[serde(rename = "object_types", skip_serializing_if = "Option::is_none")]
16    pub object_types: Option<Vec<String>>,
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
20    pub description: Option<String>,
21    /// Any additional parameters (<https://jinja.palletsprojects.com/en/stable/api/#jinja2.Environment>) to pass when constructing the Jinja environment
22    #[serde(
23        rename = "environment_params",
24        default,
25        with = "::serde_with::rust::double_option",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub environment_params: Option<Option<serde_json::Value>>,
29    /// Jinja template code.
30    #[serde(rename = "template_code", skip_serializing_if = "Option::is_none")]
31    pub template_code: Option<String>,
32    /// Defaults to <code>text/plain; charset=utf-8</code>
33    #[serde(rename = "mime_type", skip_serializing_if = "Option::is_none")]
34    pub mime_type: Option<String>,
35    /// Filename to give to the rendered export file
36    #[serde(rename = "file_name", skip_serializing_if = "Option::is_none")]
37    pub file_name: Option<String>,
38    /// Extension to append to the rendered filename
39    #[serde(rename = "file_extension", skip_serializing_if = "Option::is_none")]
40    pub file_extension: Option<String>,
41    /// Download file as attachment
42    #[serde(rename = "as_attachment", skip_serializing_if = "Option::is_none")]
43    pub as_attachment: Option<bool>,
44    #[serde(rename = "data_source", skip_serializing_if = "Option::is_none")]
45    pub data_source: Option<Box<crate::models::ConfigContextProfileRequestDataSource>>,
46}
47
48impl PatchedExportTemplateRequest {
49    /// Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see <https://github.com/encode/django-rest-framework/issues/3144>)
50    pub fn new() -> PatchedExportTemplateRequest {
51        PatchedExportTemplateRequest {
52            object_types: None,
53            name: None,
54            description: None,
55            environment_params: None,
56            template_code: None,
57            mime_type: None,
58            file_name: None,
59            file_extension: None,
60            as_attachment: None,
61            data_source: None,
62        }
63    }
64}