pub struct Note {Show 13 fields
pub id: Option<Uuid>,
pub object_type: Option<String>,
pub display: Option<String>,
pub url: Option<String>,
pub natural_slug: Option<String>,
pub assigned_object_type: String,
pub assigned_object: Option<Option<Box<NoteAssignedObject>>>,
pub assigned_object_id: Uuid,
pub user_name: Option<String>,
pub note: String,
pub user: Option<Option<Box<ApprovalWorkflowUser>>>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
}Expand description
Note : 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.
Fields§
§id: Option<Uuid>§object_type: Option<String>§display: Option<String>Human friendly display value
url: Option<String>§natural_slug: Option<String>§assigned_object_type: String§assigned_object: Option<Option<Box<NoteAssignedObject>>>§assigned_object_id: Uuid§user_name: Option<String>§note: String§user: Option<Option<Box<ApprovalWorkflowUser>>>§created: Option<Option<String>>§last_updated: Option<Option<String>>Implementations§
Source§impl Note
impl Note
Sourcepub fn new(
assigned_object_type: String,
assigned_object_id: Uuid,
note: String,
) -> Note
pub fn new( assigned_object_type: String, assigned_object_id: Uuid, note: String, ) -> Note
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.