/*
* NetBox REST API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 4.5.9-Docker-4.0.2 (4.5)
*
* Generated by: https://openapi-generator.tech
*/
/// BriefUser : 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>)
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BriefUser {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i32>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "display", skip_serializing_if = "Option::is_none")]
pub display: Option<String>,
/// Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
#[serde(rename = "username")]
pub username: String,
}
impl BriefUser {
/// 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>)
pub fn new(username: String) -> BriefUser {
BriefUser {
id: None,
url: None,
display: None,
username,
}
}
}