class_docstr: DatasourceConfig
docstr: Returns the object represented by the json string
docstr_tok: ["Returns","the","object","represented","by","the","json","string"]
code: def from_json(cls, json_str: str) -> DatasourceConfig:
      """Returns the object represented by the json string"""
      instance = DatasourceConfig.construct()
      error_messages = []
      match = 0
  
      # use oneOf discriminator to lookup the data type
      _data_type = json.loads(json_str).get("type")
      if not _data_type:
          raise ValueError(
              "Failed to lookup data type from the field `type` in the input."
          )
  
      # check if data type is `DatasourceConfigAzure`
      if _data_type == "AZURE":
          instance.actual_instance = DatasourceConfigAzure.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigAzure`
      if _data_type == "DatasourceConfigAzure":
          instance.actual_instance = DatasourceConfigAzure.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigGCS`
      if _data_type == "DatasourceConfigGCS":
          instance.actual_instance = DatasourceConfigGCS.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigLIGHTLY`
      if _data_type == "DatasourceConfigLIGHTLY":
          instance.actual_instance = DatasourceConfigLIGHTLY.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigLOCAL`
      if _data_type == "DatasourceConfigLOCAL":
          instance.actual_instance = DatasourceConfigLOCAL.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigOBS`
      if _data_type == "DatasourceConfigOBS":
          instance.actual_instance = DatasourceConfigOBS.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigS3`
      if _data_type == "DatasourceConfigS3":
          instance.actual_instance = DatasourceConfigS3.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigS3DelegatedAccess`
      if _data_type == "DatasourceConfigS3DelegatedAccess":
          instance.actual_instance = (
              DatasourceConfigS3DelegatedAccess.from_json(json_str)
          )
          return instance
  
      # check if data type is `DatasourceConfigGCS`
      if _data_type == "GCS":
          instance.actual_instance = DatasourceConfigGCS.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigLIGHTLY`
      if _data_type == "LIGHTLY":
          instance.actual_instance = DatasourceConfigLIGHTLY.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigLOCAL`
      if _data_type == "LOCAL":
          instance.actual_instance = DatasourceConfigLOCAL.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigOBS`
      if _data_type == "OBS":
          instance.actual_instance = DatasourceConfigOBS.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigS3`
      if _data_type == "S3":
          instance.actual_instance = DatasourceConfigS3.from_json(
              json_str
          )
          return instance
  
      # check if data type is `DatasourceConfigS3DelegatedAccess`
      if _data_type == "S3DelegatedAccess":
          instance.actual_instance = (
              DatasourceConfigS3DelegatedAccess.from_json(json_str)
          )
          return instance
  
      # deserialize data into DatasourceConfigLIGHTLY
      try:
          instance.actual_instance = DatasourceConfigLIGHTLY.from_json(
              json_str
          )
          match += 1
      except (ValidationError, ValueError) as e:
          error_messages.append(str(e))
      # deserialize data into DatasourceConfigS3
      try:
          instance.actual_instance = DatasourceConfigS3.from_json(
              json_str
          )
          match += 1
      except (ValidationError, ValueError) as e:
          error_messages.append(str(e))
      # deserialize data into DatasourceConfigS3DelegatedAccess
      try:
          instance.actual_instance = (
              DatasourceConfigS3DelegatedAccess.from_json(json_str)
          )
          match += 1
      except (ValidationError, ValueError) as e:
          error_messages.append(str(e))
      # deserialize data into DatasourceConfigGCS
      try:
          instance.actual_instance = DatasourceConfigGCS.from_json(
              json_str
          )
          match += 1
      except (ValidationError, ValueError) as e:
          error_messages.append(str(e))
      # deserialize data into DatasourceConfigAzure
      try:
          instance.actual_instance = DatasourceConfigAzure.from_json(
              json_str
          )
          match += 1
      except (ValidationError, ValueError) as e:
          error_messages.append(str(e))
      # deserialize data into DatasourceConfigOBS
      try:
          instance.actual_instance = DatasourceConfigOBS.from_json(
              json_str
          )
          match += 1
      except (ValidationError, ValueError) as e:
          error_messages.append(str(e))
      # deserialize data into DatasourceConfigLOCAL
      try:
          instance.actual_instance = DatasourceConfigLOCAL.from_json(
              json_str
          )
          match += 1
      except (ValidationError, ValueError) as e:
          error_messages.append(str(e))
  
      if match > 1:
          # more than 1 match
          raise ValueError(
              "Multiple matches found when deserializing the JSON string into DatasourceConfig with oneOf schemas: DatasourceConfigAzure, DatasourceConfigGCS, DatasourceConfigLIGHTLY, DatasourceConfigLOCAL, DatasourceConfigOBS, DatasourceConfigS3, DatasourceConfigS3DelegatedAccess. Details: "
              + ", ".join(error_messages)
          )
      elif match == 0:
          # no match
          raise ValueError(
              "No match found when deserializing the JSON string into DatasourceConfig with oneOf schemas: DatasourceConfigAzure, DatasourceConfigGCS, DatasourceConfigLIGHTLY, DatasourceConfigLOCAL, DatasourceConfigOBS, DatasourceConfigS3, DatasourceConfigS3DelegatedAccess. Details: "
              + ", ".join(error_messages)
          )
      else:
          return instance
  
imports: from __future__ import annotations
  from inspect import getfullargspec
  import json
  import pprint
  import re
  from typing import Any, List, Optional
  from pydantic import BaseModel, Field, StrictStr, ValidationError, validator
  from lightly.openapi_generated.swagger_client.models.datasource_config_azure import DatasourceConfigAzure
  from lightly.openapi_generated.swagger_client.models.datasource_config_gcs import DatasourceConfigGCS
  from lightly.openapi_generated.swagger_client.models.datasource_config_lightly import DatasourceConfigLIGHTLY
  from lightly.openapi_generated.swagger_client.models.datasource_config_local import DatasourceConfigLOCAL
  from lightly.openapi_generated.swagger_client.models.datasource_config_obs import DatasourceConfigOBS
  from lightly.openapi_generated.swagger_client.models.datasource_config_s3 import DatasourceConfigS3
  from lightly.openapi_generated.swagger_client.models.datasource_config_s3_delegated_access import DatasourceConfigS3DelegatedAccess
  from typing import Any, List
  from pydantic import StrictStr, Field, Extra
label_desc: Use image node_id 4 for calling the DatasourceConfig obj's underlying member method code with example usage: obj.from_json(cls, json_str) and returns: instance, instance, instance, instance, instance, instance, instance, instance, instance, instance, instance, instance, instance, instance, instance