Crop Parameters
immichpy.client.generated.models.crop_parameters.CropParameters
pydantic-model
Bases: BaseModel
CropParameters
Show JSON schema:
{
"description": "CropParameters",
"properties": {
"height": {
"anyOf": [
{
"minimum": 1,
"type": "number"
},
{
"minimum": 1,
"type": "integer"
}
],
"description": "Height of the crop",
"title": "Height"
},
"width": {
"anyOf": [
{
"minimum": 1,
"type": "number"
},
{
"minimum": 1,
"type": "integer"
}
],
"description": "Width of the crop",
"title": "Width"
},
"x": {
"anyOf": [
{
"minimum": 0,
"type": "number"
},
{
"minimum": 0,
"type": "integer"
}
],
"description": "Top-Left X coordinate of crop",
"title": "X"
},
"y": {
"anyOf": [
{
"minimum": 0,
"type": "number"
},
{
"minimum": 0,
"type": "integer"
}
],
"description": "Top-Left Y coordinate of crop",
"title": "Y"
}
},
"required": [
"height",
"width",
"x",
"y"
],
"title": "CropParameters",
"type": "object"
}
Config:
populate_by_name:Truevalidate_assignment:Trueprotected_namespaces:()
Fields:
-
height(Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]) -
width(Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]) -
x(Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]) -
y(Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]])
height
pydantic-field
height: Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]
Height of the crop
width
pydantic-field
width: Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]
Width of the crop
x
pydantic-field
x: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]
Top-Left X coordinate of crop
y
pydantic-field
y: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]
Top-Left Y coordinate of crop
from_dict
classmethod
from_dict(obj: Optional[Dict[str, Any]]) -> Optional[Self]
Create an instance of CropParameters from a dict
Source code in immichpy/client/generated/models/crop_parameters.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
from_json
classmethod
from_json(json_str: str) -> Optional[Self]
Create an instance of CropParameters from a JSON string
Source code in immichpy/client/generated/models/crop_parameters.py
64 65 66 67 | |
to_dict
to_dict() -> Dict[str, Any]
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True):
Noneis only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNoneare ignored.
Source code in immichpy/client/generated/models/crop_parameters.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
to_json
to_json() -> str
Returns the JSON representation of the model using alias
Source code in immichpy/client/generated/models/crop_parameters.py
59 60 61 62 | |
to_str
to_str() -> str
Returns the string representation of the model using alias
Source code in immichpy/client/generated/models/crop_parameters.py
55 56 57 | |