pub struct BulkWritableCustomFieldRequest {Show 16 fields
pub id: Uuid,
pub content_types: Vec<String>,
pub type: CustomFieldTypeChoices,
pub filter_logic: Option<FilterLogicEnum>,
pub label: String,
pub grouping: Option<String>,
pub key: Option<String>,
pub description: Option<String>,
pub required: Option<bool>,
pub default: Option<Option<Value>>,
pub weight: Option<i32>,
pub validation_minimum: Option<Option<i64>>,
pub validation_maximum: Option<Option<i64>>,
pub validation_regex: Option<String>,
pub advanced_ui: Option<bool>,
pub scope_filter: Option<Option<Value>>,
}Expand description
BulkWritableCustomFieldRequest : 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: Uuid§content_types: Vec<String>§type: CustomFieldTypeChoices§filter_logic: Option<FilterLogicEnum>§label: String§grouping: Option<String>Human-readable grouping that this custom field belongs to.
key: Option<String>Internal field name. Please use underscores rather than dashes in this key.
description: Option<String>A helpful description for this field.
required: Option<bool>If true, this field is required when creating new objects or editing an existing object.
default: Option<Option<Value>>Default value for the field (must be a JSON value). Encapsulate strings with double quotes (e.g. "Foo").
weight: Option<i32>Fields with higher weights appear lower in a form.
validation_minimum: Option<Option<i64>>Minimum allowed value (for numeric fields) or length (for text fields).
validation_maximum: Option<Option<i64>>Maximum allowed value (for numeric fields) or length (for text fields).
validation_regex: Option<String>Regular expression to enforce on text field values. Use ^ and $ to force matching of entire string. For example, ^[A-Z]{3}$ will limit values to exactly three uppercase letters. Regular expression on select and multi-select will be applied at Custom Field Choices definition.
advanced_ui: Option<bool>Hide this field from the object’s primary information tab. It will appear in the "Advanced" tab instead.
scope_filter: Option<Option<Value>>A JSON-encoded dictionary of filter parameters defining possible objects that can use this custom field.
Implementations§
Source§impl BulkWritableCustomFieldRequest
impl BulkWritableCustomFieldRequest
Sourcepub fn new(
id: Uuid,
content_types: Vec<String>,
type: CustomFieldTypeChoices,
label: String,
) -> BulkWritableCustomFieldRequest
pub fn new( id: Uuid, content_types: Vec<String>, type: CustomFieldTypeChoices, label: String, ) -> BulkWritableCustomFieldRequest
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 BulkWritableCustomFieldRequest
impl Clone for BulkWritableCustomFieldRequest
Source§fn clone(&self) -> BulkWritableCustomFieldRequest
fn clone(&self) -> BulkWritableCustomFieldRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for BulkWritableCustomFieldRequest
impl Default for BulkWritableCustomFieldRequest
Source§fn default() -> BulkWritableCustomFieldRequest
fn default() -> BulkWritableCustomFieldRequest
Source§impl<'de> Deserialize<'de> for BulkWritableCustomFieldRequest
impl<'de> Deserialize<'de> for BulkWritableCustomFieldRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for BulkWritableCustomFieldRequest
impl PartialEq for BulkWritableCustomFieldRequest
Source§fn eq(&self, other: &BulkWritableCustomFieldRequest) -> bool
fn eq(&self, other: &BulkWritableCustomFieldRequest) -> bool
self and other values to be equal, and is used by ==.