Construct the API resource representation of this access entry

        Returns:
            Dict[str, object]: Access entry represented as an API resource

def to_api_repr(self):
        """Construct the API resource representation of this access entry

        Returns:
            Dict[str, object]: Access entry represented as an API resource
        """
        resource = {self.entity_type: self.entity_id}
        if self.role is not None:
            resource["role"] = self.role
        return resource