code: def to_volume(volume):
          
          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!')
docs: Serializes volume to id string
          :param volume: object to serialize
          :return: string id