Skip to content

Sync Ack Dto

immichpy.client.generated.models.sync_ack_dto.SyncAckDto pydantic-model

Bases: BaseModel

SyncAckDto

Show JSON schema:
{
  "$defs": {
    "SyncEntityType": {
      "description": "Sync entity type",
      "enum": [
        "AuthUserV1",
        "UserV1",
        "UserDeleteV1",
        "AssetV1",
        "AssetDeleteV1",
        "AssetExifV1",
        "AssetEditV1",
        "AssetEditDeleteV1",
        "AssetMetadataV1",
        "AssetMetadataDeleteV1",
        "PartnerV1",
        "PartnerDeleteV1",
        "PartnerAssetV1",
        "PartnerAssetBackfillV1",
        "PartnerAssetDeleteV1",
        "PartnerAssetExifV1",
        "PartnerAssetExifBackfillV1",
        "PartnerStackBackfillV1",
        "PartnerStackDeleteV1",
        "PartnerStackV1",
        "AlbumV1",
        "AlbumDeleteV1",
        "AlbumUserV1",
        "AlbumUserBackfillV1",
        "AlbumUserDeleteV1",
        "AlbumAssetCreateV1",
        "AlbumAssetUpdateV1",
        "AlbumAssetBackfillV1",
        "AlbumAssetExifCreateV1",
        "AlbumAssetExifUpdateV1",
        "AlbumAssetExifBackfillV1",
        "AlbumToAssetV1",
        "AlbumToAssetDeleteV1",
        "AlbumToAssetBackfillV1",
        "MemoryV1",
        "MemoryDeleteV1",
        "MemoryToAssetV1",
        "MemoryToAssetDeleteV1",
        "StackV1",
        "StackDeleteV1",
        "PersonV1",
        "PersonDeleteV1",
        "AssetFaceV1",
        "AssetFaceV2",
        "AssetFaceDeleteV1",
        "UserMetadataV1",
        "UserMetadataDeleteV1",
        "SyncAckV1",
        "SyncResetV1",
        "SyncCompleteV1"
      ],
      "title": "SyncEntityType",
      "type": "string"
    }
  },
  "description": "SyncAckDto",
  "properties": {
    "ack": {
      "description": "Acknowledgment ID",
      "title": "Ack",
      "type": "string"
    },
    "type": {
      "$ref": "#/$defs/SyncEntityType"
    }
  },
  "required": [
    "ack",
    "type"
  ],
  "title": "SyncAckDto",
  "type": "object"
}

Config:

  • populate_by_name: True
  • validate_assignment: True
  • protected_namespaces: ()

Fields:

ack pydantic-field

ack: StrictStr

Acknowledgment ID

type pydantic-field

type: SyncEntityType

Sync entity type

from_dict classmethod

from_dict(obj: Optional[Dict[str, Any]]) -> Optional[Self]

Create an instance of SyncAckDto from a dict

Source code in immichpy/client/generated/models/sync_ack_dto.py
74
75
76
77
78
79
80
81
82
83
84
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of SyncAckDto from a dict"""
    if obj is None:
        return None

    if not isinstance(obj, dict):
        return cls.model_validate(obj)

    _obj = cls.model_validate({"ack": obj.get("ack"), "type": obj.get("type")})
    return _obj

from_json classmethod

from_json(json_str: str) -> Optional[Self]

Create an instance of SyncAckDto from a JSON string

Source code in immichpy/client/generated/models/sync_ack_dto.py
50
51
52
53
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of SyncAckDto from a JSON string"""
    return cls.from_dict(json.loads(json_str))

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):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
Source code in immichpy/client/generated/models/sync_ack_dto.py
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
def to_dict(self) -> 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)`:

    * `None` is only added to the output dict for nullable fields that
      were set at model initialization. Other fields with value `None`
      are ignored.
    """
    excluded_fields: Set[str] = set([])

    _dict = self.model_dump(
        by_alias=True,
        exclude=excluded_fields,
        exclude_none=True,
    )
    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/sync_ack_dto.py
45
46
47
48
def to_json(self) -> str:
    """Returns the JSON representation of the model using alias"""
    # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
    return json.dumps(self.to_dict())

to_str

to_str() -> str

Returns the string representation of the model using alias

Source code in immichpy/client/generated/models/sync_ack_dto.py
41
42
43
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))