docs: def dump_links(self, o):
          """Dump links."""
          links = {
              'self': url_for(
                  '.object_api',
                  bucket_id=o.bucket_id,
                  key=o.key,
                  uploadId=o.upload_id,
                  _external=True,
              ),
              'object': url_for(
                  '.object_api',
                  bucket_id=o.bucket_id,
                  key=o.key,
                  _external=True,
              ),
          }
  
          version_id = self.context.get('object_version_id')
          if version_id:
              links.update({
                  'object_version': url_for(
                      '.object_api',
                      bucket_id=o.bucket_id,
                      key=o.key,
                      versionId=version_id,
                      _external=True,
                  )
              })
  
          bucket = self.context.get('bucket')
          if bucket:
              links.update({
                  'bucket': url_for(
                      '.bucket_api',
                      bucket_id=o.bucket_id,
                      _external=True,
                  )
              })
  
          return links