Skip to main content

netbox_openapi/models/
bulk_route_target_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/// BulkRouteTargetRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkRouteTargetRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    /// Route target value (formatted in accordance with RFC 4360)
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(
21        rename = "tenant",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub tenant: Option<Option<Box<crate::models::AsnRangeRequestTenant>>>,
27    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
28    pub description: Option<String>,
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 = "tags", skip_serializing_if = "Option::is_none")]
39    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
40    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
41    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
42}
43
44impl BulkRouteTargetRequest {
45    /// Base serializer class for models inheriting from PrimaryModel.
46    pub fn new(id: i32, name: String) -> BulkRouteTargetRequest {
47        BulkRouteTargetRequest {
48            id,
49            name,
50            tenant: None,
51            description: None,
52            owner: None,
53            comments: None,
54            tags: None,
55            custom_fields: None,
56        }
57    }
58}