Skip to main content

netbox_openapi/models/
bulk_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.8 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BulkConfigContextProfileRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkConfigContextProfileRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
20    pub description: Option<String>,
21    /// A JSON schema specifying the structure of the context data for this profile
22    #[serde(
23        rename = "schema",
24        default,
25        with = "::serde_with::rust::double_option",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub schema: Option<Option<serde_json::Value>>,
29    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
30    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
31    #[serde(
32        rename = "owner",
33        default,
34        with = "::serde_with::rust::double_option",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
38    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
39    pub comments: Option<String>,
40    #[serde(rename = "data_source", skip_serializing_if = "Option::is_none")]
41    pub data_source: Option<Box<crate::models::BulkConfigContextProfileRequestDataSource>>,
42}
43
44impl BulkConfigContextProfileRequest {
45    /// Base serializer class for models inheriting from PrimaryModel.
46    pub fn new(id: i32, name: String) -> BulkConfigContextProfileRequest {
47        BulkConfigContextProfileRequest {
48            id,
49            name,
50            description: None,
51            schema: None,
52            tags: None,
53            owner: None,
54            comments: None,
55            data_source: None,
56        }
57    }
58}