'CollectionArchiveGenerator constructor.
Args:
archive_format: May be ArchiveCollectionGenerator.ZIP or
ArchiveCollectionGenerator.TAR_GZ. Defaults to ZIP.
prefix: Name of the folder inside the archive that will contain all
the generated data.
description: String describing archive\'s contents. It will be included
into the auto-generated MANIFEST file. Defaults to
\'Files archive collection\'.
predicate: If not None, only the files matching the predicate will be
archived, all others will be skipped.
client_id: The client_id to use when exporting a flow results collection.
Raises:
ValueError: if prefix is None.'

def __init__(self, archive_format=ZIP, prefix=None, description=None, predicate=None, client_id=None):

    super(CollectionArchiveGenerator, self).__init__()
    if (archive_format == self.ZIP):
        self.archive_generator = utils.StreamingZipGenerator(compression=zipfile.ZIP_DEFLATED)
    elif (archive_format == self.TAR_GZ):
        self.archive_generator = utils.StreamingTarGenerator()
    else:
        raise ValueError(('Unknown    archive    format:    %s' % archive_format))
    if (not prefix):
        raise ValueError("Prefix    can't    be    None.")
    self.prefix = prefix
    self.description = (description or 'Files    archive    collection')
    self.total_files = 0
    self.archived_files = 0
    self.ignored_files = []
    self.failed_files = []
    self.predicate = (predicate or (lambda _: True))
    self.client_id = client_id
