@staticmethod
def get_object_id(resource) ->str:
    """
        **Can be overridden**.

        Returns the id (string) of the resource. The default implementation
        looks for a property ``resource.id``, an id method ``resource.id()``,
        ``resource.get_id()`` or a key ``resource["id"]``.

        :arg resource:
            A resource object
        :rtype: str
        :returns:
            The string representation of ID of the *resource*
        """
    if hasattr(resource, 'id'):
        resource_id = resource.id() if callable(resource.id) else resource.id
    elif hasattr(resource, 'get_id'):
        resource_id = resource.get_id()
    elif 'id' in resource:
        resource_id = resource['id']
    else:
        raise Exception('Could not determine the resource id.')
    return str(resource_id)
