class_docstr: SampleData
class_docstr_tok: ["SampleData"]
docstr: Create an instance of SampleData from a dict
docstr_tok: ["Create","an","instance","of","SampleData","from","a","dict"]
code: def from_dict(cls, obj: dict) -> SampleData:
      """Create an instance of SampleData from a dict"""
      if obj is None:
          return None
  
      if not isinstance(obj, dict):
          return SampleData.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 SampleData) in the input: "
                  + str(obj)
              )
  
      _obj = SampleData.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
  
file_path: lightly/lightly/openapi_generated/swagger_client/models/sample_data.py
imports: from __future__ import annotations
  import pprint
  import re
  import json
  from typing import Any, Dict, Optional
  from pydantic import Extra, BaseModel, Field, StrictInt, StrictStr, conint, constr, validator
  from lightly.openapi_generated.swagger_client.models.crop_data import CropData
  from lightly.openapi_generated.swagger_client.models.sample_meta_data import SampleMetaData
  from lightly.openapi_generated.swagger_client.models.sample_type import SampleType
  from lightly.openapi_generated.swagger_client.models.video_frame_data import VideoFrameData
label_desc: Use image node_id 7 for calling the SampleData obj's underlying member method code with example usage: obj.from_dict(cls, obj) and returns: _obj, None, SampleData