controller.utilities.configuration.CoreConfigurationModel.copy
- CoreConfigurationModel.copy(*, include=None, exclude=None, update=None, deep=False)
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include (default:
None) – Optional set or mapping specifying which fields to include in the copied model.exclude (default:
None) – Optional set or mapping specifying which fields to exclude in the copied model.update (default:
None) – Optional dictionary of field-value pairs to override field values in the copied model.deep (default:
False) – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.