pub struct RelationshipRequest {Show 15 fields
pub id: Option<Uuid>,
pub source_type: String,
pub destination_type: String,
pub label: String,
pub key: Option<String>,
pub description: Option<String>,
pub type: Option<RelationshipTypeChoices>,
pub required_on: Option<Box<BulkWritableRelationshipRequestRequiredOn>>,
pub source_label: Option<String>,
pub source_hidden: Option<bool>,
pub source_filter: Option<Option<Value>>,
pub destination_label: Option<String>,
pub destination_hidden: Option<bool>,
pub destination_filter: Option<Option<Value>>,
pub advanced_ui: Option<bool>,
}Expand description
RelationshipRequest : 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)
Fields§
§id: Option<Uuid>§source_type: String§destination_type: String§label: StringLabel of the relationship as displayed to users
key: Option<String>Internal relationship key. Please use underscores rather than dashes in this key.
description: Option<String>§type: Option<RelationshipTypeChoices>§required_on: Option<Box<BulkWritableRelationshipRequestRequiredOn>>§source_label: Option<String>Label for related destination objects, as displayed on the source object.
Hide this relationship on the source object.
source_filter: Option<Option<Value>>Filterset filter matching the applicable source objects of the selected type
destination_label: Option<String>Label for related source objects, as displayed on the destination object.
Hide this relationship on the destination object.
destination_filter: Option<Option<Value>>Filterset filter matching the applicable destination objects of the selected type
advanced_ui: Option<bool>Hide this field from the object’s primary information tab. It will appear in the "Advanced" tab instead.
Implementations§
Source§impl RelationshipRequest
impl RelationshipRequest
Sourcepub fn new(
source_type: String,
destination_type: String,
label: String,
) -> RelationshipRequest
pub fn new( source_type: String, destination_type: String, label: String, ) -> RelationshipRequest
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)
Trait Implementations§
Source§impl Clone for RelationshipRequest
impl Clone for RelationshipRequest
Source§fn clone(&self) -> RelationshipRequest
fn clone(&self) -> RelationshipRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more