Save this component group to a dictionary.

def to_dict(self):
        '''Save this component group to a dictionary.'''
        d = {'groupId': self.group_id}
        members = []
        for m in self.members:
            members.append(m.to_dict())
        if members:
            d['members'] = members
        return d