class_docstr: DockerWorkerConfig
class_docstr_tok: ["DockerWorkerConfig"]
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 selection
      if self.selection:
          _dict[
              "selection" if by_alias else "selection"
          ] = self.selection.to_dict(by_alias=by_alias)
      # set to None if docker (nullable) is None
      # and __fields_set__ contains the field
      if self.docker is None and "docker" in self.__fields_set__:
          _dict["docker" if by_alias else "docker"] = None
  
      # set to None if lightly (nullable) is None
      # and __fields_set__ contains the field
      if self.lightly is None and "lightly" in self.__fields_set__:
          _dict["lightly" if by_alias else "lightly"] = None
  
      return _dict
  
file_path: lightly/lightly/openapi_generated/swagger_client/models/docker_worker_config.py
imports: from __future__ import annotations
  import pprint
  import re
  import json
  from typing import Any, Dict, Optional
  from pydantic import Extra, BaseModel, Field
  from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType
  from lightly.openapi_generated.swagger_client.models.selection_config import SelectionConfig
label_desc: Use image node_id 4 for calling the DockerWorkerConfig obj's underlying member method code with example usage: obj.to_dict(by_alias) and returns: _dict