Skip to main content

nautobot_openapi/models/
ip_allocation_request.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// IpAllocationRequest : Input serializer for POST to /api/ipam/prefixes/{id}/available-ips/, i.e. allocating addresses from a prefix.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct IpAllocationRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "status")]
18    pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
19    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
20    pub r#type: Option<crate::models::IpAddressTypeChoices>,
21    /// Hostname or FQDN (not case-sensitive)
22    #[serde(rename = "dns_name", skip_serializing_if = "Option::is_none")]
23    pub dns_name: Option<String>,
24    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
25    pub description: Option<String>,
26    #[serde(
27        rename = "role",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
33    #[serde(
34        rename = "tenant",
35        default,
36        with = "::serde_with::rust::double_option",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
40    #[serde(
41        rename = "nat_inside",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub nat_inside: Option<Option<Box<crate::models::NatInside>>>,
47    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
48    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
49    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
50    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
51    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
52    pub relationships: Option<
53        ::std::collections::HashMap<
54            String,
55            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
56        >,
57    >,
58}
59
60impl IpAllocationRequest {
61    /// Input serializer for POST to /api/ipam/prefixes/{id}/available-ips/, i.e. allocating addresses from a prefix.
62    pub fn new(
63        status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
64    ) -> IpAllocationRequest {
65        IpAllocationRequest {
66            id: None,
67            status: Box::new(status),
68            r#type: None,
69            dns_name: None,
70            description: None,
71            role: None,
72            tenant: None,
73            nat_inside: None,
74            tags: None,
75            custom_fields: None,
76            relationships: None,
77        }
78    }
79}