import itertools


def get_copasi_model_obj_sbml_ids(model):
    """ Get the SBML id of each object of a COPASI model

    Args:
        model (:obj:`COPASI.CModel`): model

    Returns:
        :obj:`list` of :obj:`str: SBML id of each object of the model
    """
    ids = []

    for object in itertools.chain(
        model.getMetabolites(),
        model.getModelValues(),
        model.getCompartments(),
        model.getReactions()
    ):
        ids.append(object.getSBMLId())

    return ids