def from_json(cls, json_str: str) -> DockerWorkerConfigVXData:
        """Returns the object represented by the json string"""
        instance = DockerWorkerConfigVXData.construct()
        error_messages = []
        match = 0

        # use oneOf discriminator to lookup the data type
        _data_type = json.loads(json_str).get("version")
        if not _data_type:
            raise ValueError("Failed to lookup data type from the field `version` in the input.")

        # check if data type is `DockerWorkerConfigV0Data`
        if _data_type == "DockerWorkerConfigV0Data":
            instance.actual_instance = DockerWorkerConfigV0Data.from_json(json_str)
            return instance

        # check if data type is `DockerWorkerConfigV2Data`
        if _data_type == "DockerWorkerConfigV2Data":
            instance.actual_instance = DockerWorkerConfigV2Data.from_json(json_str)
            return instance

        # check if data type is `DockerWorkerConfigV3Data`
        if _data_type == "DockerWorkerConfigV3Data":
            instance.actual_instance = DockerWorkerConfigV3Data.from_json(json_str)
            return instance

        # check if data type is `DockerWorkerConfigV4Data`
        if _data_type == "DockerWorkerConfigV4Data":
            instance.actual_instance = DockerWorkerConfigV4Data.from_json(json_str)
            return instance

        # check if data type is `DockerWorkerConfigV0Data`
        if _data_type == "V0":
            instance.actual_instance = DockerWorkerConfigV0Data.from_json(json_str)
            return instance

        # check if data type is `DockerWorkerConfigV2Data`
        if _data_type == "V2":
            instance.actual_instance = DockerWorkerConfigV2Data.from_json(json_str)
            return instance

        # check if data type is `DockerWorkerConfigV3Data`
        if _data_type == "V3":
            instance.actual_instance = DockerWorkerConfigV3Data.from_json(json_str)
            return instance

        # check if data type is `DockerWorkerConfigV4Data`
        if _data_type == "V4":
            instance.actual_instance = DockerWorkerConfigV4Data.from_json(json_str)
            return instance

        # deserialize data into DockerWorkerConfigV0Data
        try:
            instance.actual_instance = DockerWorkerConfigV0Data.from_json(json_str)
            match += 1
        except (ValidationError, ValueError) as e:
            error_messages.append(str(e))
        # deserialize data into DockerWorkerConfigV2Data
        try:
            instance.actual_instance = DockerWorkerConfigV2Data.from_json(json_str)
            match += 1
        except (ValidationError, ValueError) as e:
            error_messages.append(str(e))
        # deserialize data into DockerWorkerConfigV3Data
        try:
            instance.actual_instance = DockerWorkerConfigV3Data.from_json(json_str)
            match += 1
        except (ValidationError, ValueError) as e:
            error_messages.append(str(e))
        # deserialize data into DockerWorkerConfigV4Data
        try:
            instance.actual_instance = DockerWorkerConfigV4Data.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 DockerWorkerConfigVXData with oneOf schemas: DockerWorkerConfigV0Data, DockerWorkerConfigV2Data, DockerWorkerConfigV3Data, DockerWorkerConfigV4Data. Details: " + ", ".join(error_messages))
        elif match == 0:
            # no match
            raise ValueError("No match found when deserializing the JSON string into DockerWorkerConfigVXData with oneOf schemas: DockerWorkerConfigV0Data, DockerWorkerConfigV2Data, DockerWorkerConfigV3Data, DockerWorkerConfigV4Data. Details: " + ", ".join(error_messages))
        else:
            return instance
Returns the object represented by the json string
lightly/openapi_generated/swagger_client/models/docker_worker_config_vx_data.py