TokenChangeHistoryEntry#

class gafaelfawr.models.history.TokenChangeHistoryEntry(**data)#

Bases: BaseModel

A record of a change to a token.

Parameters:

data (Any)

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

model_dump_reduced()

Convert to a dictionary while suppressing some fields.

Attributes Documentation

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

model_dump_reduced()#

Convert to a dictionary while suppressing some fields.

The same as the standard Pydantic model_dump method, but excludes the old_ fields for changes other than edits and when the edit doesn’t change those fields.

Returns:

Dictionary representation of the object.

Return type:

dict

Notes

Knowing which fields to exclude requires understanding the semantics of the change (particularly when deciding whether to drop old_expires) in ways that are too complex to do with the standard Pydantic filtering API, hence the hand-rolled method.