def get_id(self, version: int, prefixed: bool=True) -> str:
    if (version == 1):
        if self.templatePrefix:
            raise NoOldIdError()
        if ((self.objectType == 'enumerator') and self.enumeratorScopedSymbol):
            return self.enumeratorScopedSymbol.declaration.get_id(version)
        return self.declaration.get_id(version, self.objectType, self.symbol)
    if ((self.objectType == 'enumerator') and self.enumeratorScopedSymbol):
        return self.enumeratorScopedSymbol.declaration.get_id(version, prefixed)
    if prefixed:
        res = [_id_prefix[version]]
    else:
        res = []
    if self.templatePrefix:
        res.append(self.templatePrefix.get_id(version))
    res.append(self.declaration.get_id(version, self.objectType, self.symbol))
    return ''.join(res)
def get_id(self, version: int, prefixed: bool=True) -> str:
    if (version == 1):
        if self.templatePrefix:
            raise NoOldIdError()
        if ((self.objectType == 'enumerator') and self.enumeratorScopedSymbol):
            return self.enumeratorScopedSymbol.declaration.get_id(version)
        return self.declaration.get_id(version, self.objectType, self.symbol)
    if ((self.objectType == 'enumerator') and self.enumeratorScopedSymbol):
        return self.enumeratorScopedSymbol.declaration.get_id(version, prefixed)
    if prefixed:
        res = [_id_prefix[version]]
    else:
        res = []
    if self.templatePrefix:
        res.append(self.templatePrefix.get_id(version))
    res.append(self.declaration.get_id(version, self.objectType, self.symbol))
    return .join(res)