/*
* API Documentation
*
* Source of truth and network automation platform
*
* The version of the OpenAPI document: 2.4.20 (2.4)
*
* Generated by: https://openapi-generator.tech
*/
/// PatchedBulkWritableNoteRequest : This base serializer implements common fields and logic for all ModelSerializers. Namely, it: - defines the `display` field which exposes a human friendly value for the given object. - ensures that `id` field is always present on the serializer as well. - ensures that `created` and `last_updated` fields are always present if applicable to this model and serializer. - ensures that `object_type` field is always present on the serializer which represents the content-type of this serializer's associated model (e.g. \"dcim.device\"). This is required as the OpenAPI schema, using the PolymorphicProxySerializer class defined below, relies upon this field as a way to identify to the client which of several possible serializers are in use for a given attribute. - supports `?depth` query parameter. It is passed in as `nested_depth` to the `build_nested_field()` function to enable the dynamic generation of nested serializers.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedBulkWritableNoteRequest {
#[serde(rename = "id")]
pub id: uuid::Uuid,
#[serde(
rename = "assigned_object_type",
skip_serializing_if = "Option::is_none"
)]
pub assigned_object_type: Option<String>,
#[serde(rename = "assigned_object_id", skip_serializing_if = "Option::is_none")]
pub assigned_object_id: Option<uuid::Uuid>,
#[serde(rename = "note", skip_serializing_if = "Option::is_none")]
pub note: Option<String>,
#[serde(
rename = "user",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub user: Option<Option<Box<crate::models::BulkWritableCircuitRequestTenant>>>,
}
impl PatchedBulkWritableNoteRequest {
/// This base serializer implements common fields and logic for all ModelSerializers. Namely, it: - defines the `display` field which exposes a human friendly value for the given object. - ensures that `id` field is always present on the serializer as well. - ensures that `created` and `last_updated` fields are always present if applicable to this model and serializer. - ensures that `object_type` field is always present on the serializer which represents the content-type of this serializer's associated model (e.g. \"dcim.device\"). This is required as the OpenAPI schema, using the PolymorphicProxySerializer class defined below, relies upon this field as a way to identify to the client which of several possible serializers are in use for a given attribute. - supports `?depth` query parameter. It is passed in as `nested_depth` to the `build_nested_field()` function to enable the dynamic generation of nested serializers.
pub fn new(id: uuid::Uuid) -> PatchedBulkWritableNoteRequest {
PatchedBulkWritableNoteRequest {
id,
assigned_object_type: None,
assigned_object_id: None,
note: None,
user: None,
}
}
}