nautobot_openapi/models/bulk_writable_vrf_prefix_assignment_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/// BulkWritableVrfPrefixAssignmentRequest : 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 BulkWritableVrfPrefixAssignmentRequest {
15 #[serde(rename = "id")]
16 pub id: uuid::Uuid,
17 #[serde(rename = "vrf")]
18 pub vrf: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
19 #[serde(rename = "prefix")]
20 pub prefix: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
21}
22
23impl BulkWritableVrfPrefixAssignmentRequest {
24 /// 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>)
25 pub fn new(
26 id: uuid::Uuid,
27 vrf: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
28 prefix: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
29 ) -> BulkWritableVrfPrefixAssignmentRequest {
30 BulkWritableVrfPrefixAssignmentRequest {
31 id,
32 vrf: Box::new(vrf),
33 prefix: Box::new(prefix),
34 }
35 }
36}