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
Returns the object represented by the json string
lightly/openapi_generated/swagger_client/models/datasource_config.py