ImageFilter#
- pydantic model nublado.models.images.ImageFilter#
Policy for images to display within a given category.
All specified policies will be applied. For instance, if the policy specifies both age and cutoff version, then an image will have to be newer than the specified age, and also have a version greater than or equal to the cutoff, in order to be displayed.
If no policies are specified, no filtering will be performed and all images of that category will be displayed.
- Parameters:
data (
Any)
Show JSON schema
{ "title": "ImageFilter", "description": "Policy for images to display within a given category.\n\nAll specified policies will be applied. For instance, if the policy\nspecifies both age and cutoff version, then an image will have to be\nnewer than the specified age, and also have a version greater than or\nequal to the cutoff, in order to be displayed.\n\nIf no policies are specified, no filtering will be performed and all\nimages of that category will be displayed.", "type": "object", "properties": { "number": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of images to retain", "title": "Number" }, "age": { "anyOf": [ { "$ref": "#/$defs/HumanTimedelta" }, { "type": "null" } ], "default": null, "description": "Maximum age of image to retain. Applies only to images based on weeklies or dailies and is based on the age of the weekly or daily, not on the age of the build.", "title": "Age" }, "cutoffDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Minimum date of image to display. Applies only to images based on weeklies or dailies. Weeklies are assumed to be built on Thursday.", "title": "Cutoff date" }, "cutoffVersion": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Minimum version of image to display. Applies only to images based on releases or release candidates.", "title": "Cutoff version" } }, "$defs": { "HumanTimedelta": { "format": "duration", "type": "string" } }, "additionalProperties": false }
- Fields:
-
field age:
Annotated[Optional[TypeAliasType]] = None# Maximum age of image to retain. Applies only to images based on weeklies or dailies and is based on the age of the weekly or daily, not on the age of the build.
-
field cutoffDate:
Annotated[Optional[datetime]] = None (name 'cutoff_date')# Minimum date of image to display. Applies only to images based on weeklies or dailies. Weeklies are assumed to be built on Thursday.
-
field cutoffVersion:
Annotated[Optional[Version]] = None (name 'cutoff_version')# Minimum version of image to display. Applies only to images based on releases or release candidates.
- Constraints:
func = <function ImageFilter.<lambda> at 0x7f2b5a4dc880>
json_schema_input_type = str | None
return_type = str | None
when_used = always