class_docstr: TagData
class_docstr_tok: ["TagData"]
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 each item in changes (list)
      _items = []
      if self.changes:
          for _item in self.changes:
              if _item:
                  _items.append(_item.to_dict(by_alias=by_alias))
          _dict["changes" if by_alias else "changes"] = _items
      # set to None if prev_tag_id (nullable) is None
      # and __fields_set__ contains the field
      if (
          self.prev_tag_id is None
          and "prev_tag_id" in self.__fields_set__
      ):
          _dict["prevTagId" if by_alias else "prev_tag_id"] = None
  
      return _dict
  
imports: from __future__ import annotations
  import pprint
  import re
  import json
  from typing import List, Optional
  from pydantic import Extra, BaseModel, Field, StrictInt, conint, conlist, constr, validator
  from lightly.openapi_generated.swagger_client.models.tag_change_entry import TagChangeEntry
label_desc: Use image node_id 12 for calling the TagData obj's underlying member method code with example usage: obj.to_dict(by_alias) and returns: _dict