pub struct ObjectChange {Show 20 fields
pub id: Option<Uuid>,
pub object_type: Option<String>,
pub display: Option<String>,
pub url: Option<String>,
pub natural_slug: Option<String>,
pub action: Option<Box<ObjectChangeAction>>,
pub changed_object_type: Option<String>,
pub related_object_type: Option<String>,
pub changed_object: Option<Option<Box<ObjectChangeChangedObject>>>,
pub time: Option<String>,
pub user_name: Option<String>,
pub request_id: Option<Uuid>,
pub changed_object_id: Uuid,
pub change_context: Option<String>,
pub change_context_detail: Option<String>,
pub related_object_id: Option<Option<Uuid>>,
pub object_repr: Option<String>,
pub object_data: Option<Option<Value>>,
pub object_data_v2: Option<Option<Value>>,
pub user: Option<Option<Box<ApprovalWorkflowUser>>>,
}Expand description
ObjectChange : 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>§action: Option<Box<ObjectChangeAction>>§changed_object_type: Option<String>§changed_object: Option<Option<Box<ObjectChangeChangedObject>>>§time: Option<String>§user_name: Option<String>§request_id: Option<Uuid>§changed_object_id: Uuid§change_context: Option<String>§change_context_detail: Option<String>§object_repr: Option<String>§object_data: Option<Option<Value>>§object_data_v2: Option<Option<Value>>§user: Option<Option<Box<ApprovalWorkflowUser>>>Implementations§
Source§impl ObjectChange
impl ObjectChange
Sourcepub fn new(changed_object_id: Uuid) -> ObjectChange
pub fn new(changed_object_id: Uuid) -> ObjectChange
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.
Trait Implementations§
Source§impl Clone for ObjectChange
impl Clone for ObjectChange
Source§fn clone(&self) -> ObjectChange
fn clone(&self) -> ObjectChange
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more