code: private static void validateTrigger(String targetType, BoxWebHook.Trigger trigger) {
          for (String type : trigger.getTypes()) {
              if (targetType.equals(type)) {
                  return;
              }
          }
          throw new IllegalArgumentException(String.format(
                  "Provided trigger '%s' is not supported on provided target '%s'.", trigger.name(), targetType));
      }
docs: Validates that provided {@link BoxWebHook.Trigger} can be applied on the provided {@link BoxResourceType}.
  
  @param targetType
  on which targets the trigger should be applied to
  @param trigger
  for check
  
  @see #validateTriggers(String, Collection)