netbox_openapi/models/
patched_config_context_profile_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/// PatchedConfigContextProfileRequest : 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 PatchedConfigContextProfileRequest {
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    /// A JSON schema specifying the structure of the context data for this profile
20    #[serde(
21        rename = "schema",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub schema: Option<Option<serde_json::Value>>,
27    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
28    pub tags: Option<Vec<String>>,
29    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
30    pub comments: Option<String>,
31    #[serde(rename = "data_source", skip_serializing_if = "Option::is_none")]
32    pub data_source: Option<Box<crate::models::ConfigContextProfileRequestDataSource>>,
33}
34
35impl PatchedConfigContextProfileRequest {
36    /// 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>)
37    pub fn new() -> PatchedConfigContextProfileRequest {
38        PatchedConfigContextProfileRequest {
39            name: None,
40            description: None,
41            schema: None,
42            tags: None,
43            comments: None,
44            data_source: None,
45        }
46    }
47}