code: public Optional<ProjectHook> getOptionalHook(Object projectIdOrPath, Integer hookId) {
          try {
              return (Optional.ofNullable(getHook(projectIdOrPath, hookId)));
          } catch (GitLabApiException glae) {
              return (GitLabApi.createOptionalFromException(glae));
          }
      }
docs: Get a specific hook for project as an Optional instance.
  
  <pre><code>GET /projects/:id/hooks/:hook_id</code></pre>
  
  @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
  @param hookId the ID of the hook to get
  @return the project hook for the specified project ID/hook ID pair as an Optional instance