Skip to main content

IncludeExclude

This class manages the filtering logic for including or excluding specific fields or data during processing. It provides a structured way to store and apply inclusion and exclusion criteria, typically used for controlling the visibility or serialization of object attributes.

Attributes

AttributeTypeDescription
includeOptional[Any] = NoneA collection of fields or patterns to be included during the serialization or processing of the object.
excludeOptional[Any] = NoneA collection of fields or patterns to be omitted during the serialization or processing of the object.

Constructor

Signature

def IncludeExclude(
include: Option< Bound< 'py, PyAny > > = null,
exclude: Option< Bound< 'py, PyAny > > = null
) - > null

Parameters

NameTypeDescription
includeOption< Bound< 'py, PyAny > > = nullAn optional filter specifying items to include.
excludeOption< Bound< 'py, PyAny > > = nullAn optional filter specifying items to exclude.

Signature

def IncludeExclude(
include: Option< Bound< 'py, PyAny > >,
exclude: Option< Bound< 'py, PyAny > >
) - > [IncludeExclude](includeexclude.md?sid=serializers_extra_includeexclude)

Parameters

NameTypeDescription
includeOption< Bound< 'py, PyAny > >A collection of keys or patterns specifying which items should be explicitly included in the output.
excludeOption< Bound< 'py, PyAny > >A collection of keys or patterns specifying which items should be explicitly omitted from the output.