docs: def getConstraints(self):
          """
          Get all the constraints declared.
          """
          constraints = lock_and_call(
              lambda: self._impl.getConstraints(),
              self._lock
          )
          return EntityMap(constraints, Constraint)