
class MigratedDatabaseUser(object):
    """Objects that represents database user that we are migrating"""

    def __init__(self, raw_dump, converted_dump):
        """
        :type raw_dump: parallels.core.dump.data_model.DatabaseUser
        :type converted_dump: parallels.core.dump.data_model.DatabaseUser
        """
        self._raw_dump = raw_dump
        self._converted_dump = converted_dump

    @property
    def source_name(self):
        """Database user name on the source server

        :rtype: str | unicode
        """
        return self.raw_dump.name

    @property
    def target_name(self):
        """Database user name on the target server

        :rtype: str | unicode
        """
        return self._converted_dump.name

    @property
    def dbtype(self):
        """Type of database of the user - constant from parallels.core.utils.database_server_type.DatabaseServerType

        :rtype: str | unicode
        """
        return self.raw_dump.dbtype

    @property
    def raw_dump(self):
        """Database object from raw dump

        :rtype: parallels.core.dump.data_model.DatabaseUser
        """
        return self._raw_dump

    @property
    def converted_dump(self):
        """Database object from converted dump

        :rtype: parallels.core.dump.data_model.DatabaseUser
        """
        return self._converted_dump
