class_docstr: SampleData
class_docstr_tok: ["SampleData"]
docstr: Returns the dictionary representation of the model
docstr_tok: ["Returns","the","dictionary","representation","of","the","model"]
code: def to_dict(self, by_alias: bool = False):
      """Returns the dictionary representation of the model"""
      _dict = self.dict(
          by_alias=by_alias, exclude={}, exclude_none=True
      )
      # override the default output from pydantic by calling `to_dict()` of meta_data
      if self.meta_data:
          _dict[
              "metaData" if by_alias else "meta_data"
          ] = self.meta_data.to_dict(by_alias=by_alias)
      # override the default output from pydantic by calling `to_dict()` of video_frame_data
      if self.video_frame_data:
          _dict[
              "videoFrameData" if by_alias else "video_frame_data"
          ] = self.video_frame_data.to_dict(by_alias=by_alias)
      # override the default output from pydantic by calling `to_dict()` of crop_data
      if self.crop_data:
          _dict[
              "cropData" if by_alias else "crop_data"
          ] = self.crop_data.to_dict(by_alias=by_alias)
      # set to None if thumb_name (nullable) is None
      # and __fields_set__ contains the field
      if (
          self.thumb_name is None
          and "thumb_name" in self.__fields_set__
      ):
          _dict["thumbName" if by_alias else "thumb_name"] = None
  
      # set to None if exif (nullable) is None
      # and __fields_set__ contains the field
      if self.exif is None and "exif" in self.__fields_set__:
          _dict["exif" if by_alias else "exif"] = None
  
      # set to None if custom_meta_data (nullable) is None
      # and __fields_set__ contains the field
      if (
          self.custom_meta_data is None
          and "custom_meta_data" in self.__fields_set__
      ):
          _dict[
              "customMetaData" if by_alias else "custom_meta_data"
          ] = None
  
      # set to None if video_frame_data (nullable) is None
      # and __fields_set__ contains the field
      if (
          self.video_frame_data is None
          and "video_frame_data" in self.__fields_set__
      ):
          _dict[
              "videoFrameData" if by_alias else "video_frame_data"
          ] = None
  
      # set to None if crop_data (nullable) is None
      # and __fields_set__ contains the field
      if self.crop_data is None and "crop_data" in self.__fields_set__:
          _dict["cropData" if by_alias else "crop_data"] = None
  
      return _dict
  
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 6 for calling the SampleData obj's underlying member method code with example usage: obj.to_dict(by_alias) and returns: _dict