Skip to main content

netbox_openapi/models/
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.6.2 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// ConfigContextProfileRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct ConfigContextProfileRequest {
15    #[serde(rename = "name")]
16    pub name: 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<crate::models::NestedTagRequest>>,
29    #[serde(
30        rename = "owner",
31        default,
32        with = "::serde_with::rust::double_option",
33        skip_serializing_if = "Option::is_none"
34    )]
35    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
36    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
37    pub comments: Option<String>,
38    #[serde(rename = "data_source", skip_serializing_if = "Option::is_none")]
39    pub data_source: Option<Box<crate::models::ConfigContextProfileRequestDataSource>>,
40}
41
42impl ConfigContextProfileRequest {
43    /// Base serializer class for models inheriting from PrimaryModel.
44    pub fn new(name: String) -> ConfigContextProfileRequest {
45        ConfigContextProfileRequest {
46            name,
47            description: None,
48            schema: None,
49            tags: None,
50            owner: None,
51            comments: None,
52            data_source: None,
53        }
54    }
55}