def to_volume(volume):
        """Serializes volume to id string
        :param volume: object to serialize
        :return: string id
        """
        from sevenbridges.models.volume import Volume
        if not volume:
            raise SbgError('Volume is required!')
        elif isinstance(volume, Volume):
            return volume.id
        elif isinstance(volume, six.string_types):
            return volume
        else:
            raise SbgError('Invalid volume parameter!')