def from_dict(cls, obj: dict) -> SampleDataModes:
        """Create an instance of SampleDataModes from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return SampleDataModes.parse_obj(obj)

        # raise errors for additional fields in the input
        for _key in obj.keys():
            if _key not in cls.__properties:
                raise ValueError("Error due to additional fields (not defined in SampleDataModes) in the input: " + str(obj))

        _obj = SampleDataModes.parse_obj({
            "id": obj.get("id"),
            "type": obj.get("type"),
            "dataset_id": obj.get("datasetId"),
            "file_name": obj.get("fileName"),
            "thumb_name": obj.get("thumbName"),
            "exif": obj.get("exif"),
            "index": obj.get("index"),
            "created_at": obj.get("createdAt"),
            "last_modified_at": obj.get("lastModifiedAt"),
            "meta_data": SampleMetaData.from_dict(obj.get("metaData")) if obj.get("metaData") is not None else None,
            "custom_meta_data": obj.get("customMetaData"),
            "video_frame_data": VideoFrameData.from_dict(obj.get("videoFrameData")) if obj.get("videoFrameData") is not None else None,
            "crop_data": CropData.from_dict(obj.get("cropData")) if obj.get("cropData") is not None else None
        })
        return _obj
Create an instance of SampleDataModes from a dict
lightly/openapi_generated/swagger_client/models/sample_data_modes.py