nautobot-openapi 0.4.0

low level nautobot bindings (generated by openapi-generator)
Documentation
/*
 * API Documentation
 *
 * Source of truth and network automation platform
 *
 * The version of the OpenAPI document: 3.1.0 (3.1)
 *
 * Generated by: https://openapi-generator.tech
 */

/// PatchedBulkWritablePowerFeedRequest : Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedBulkWritablePowerFeedRequest {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<crate::models::PowerFeedTypeChoices>,
    #[serde(rename = "power_path", skip_serializing_if = "Option::is_none")]
    pub power_path: Option<crate::models::PowerPathEnum>,
    #[serde(rename = "supply", skip_serializing_if = "Option::is_none")]
    pub supply: Option<crate::models::SupplyEnum>,
    #[serde(rename = "phase", skip_serializing_if = "Option::is_none")]
    pub phase: Option<crate::models::PhaseEnum>,
    #[serde(
        rename = "breaker_pole_count",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub breaker_pole_count: Option<Option<i32>>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "voltage", skip_serializing_if = "Option::is_none")]
    pub voltage: Option<i32>,
    #[serde(rename = "amperage", skip_serializing_if = "Option::is_none")]
    pub amperage: Option<i32>,
    /// Maximum permissible draw (percentage)
    #[serde(rename = "max_utilization", skip_serializing_if = "Option::is_none")]
    pub max_utilization: Option<i32>,
    /// Starting circuit breaker position in panel
    #[serde(
        rename = "breaker_position",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub breaker_position: Option<Option<i32>>,
    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
    pub comments: Option<String>,
    #[serde(
        rename = "cable",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub cable: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[serde(rename = "power_panel", skip_serializing_if = "Option::is_none")]
    pub power_panel: Option<Box<crate::models::BulkWritablePowerFeedRequestPowerPanel>>,
    #[serde(
        rename = "destination_panel",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub destination_panel:
        Option<Option<Box<crate::models::BulkWritablePowerFeedRequestDestinationPanel>>>,
    #[serde(
        rename = "rack",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub rack: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
    pub relationships: Option<
        ::std::collections::HashMap<
            String,
            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
        >,
    >,
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
}

impl PatchedBulkWritablePowerFeedRequest {
    /// Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
    pub fn new(id: uuid::Uuid) -> PatchedBulkWritablePowerFeedRequest {
        PatchedBulkWritablePowerFeedRequest {
            id,
            r#type: None,
            power_path: None,
            supply: None,
            phase: None,
            breaker_pole_count: None,
            name: None,
            voltage: None,
            amperage: None,
            max_utilization: None,
            breaker_position: None,
            comments: None,
            cable: None,
            power_panel: None,
            destination_panel: None,
            rack: None,
            status: None,
            custom_fields: None,
            relationships: None,
            tags: None,
        }
    }
}