code: private int getRiskId(JSONObject parameters) throws ApiException {
          String riskIdParam = getParam(parameters, PARAM_RISK, "").trim();
          if (riskIdParam.isEmpty()) {
              return NO_RISK_ID;
          }
  
          int riskId = NO_RISK_ID;
          try {
              riskId = Integer.parseInt(riskIdParam);
          } catch (NumberFormatException e) {
              throwInvalidRiskId();
          }
  
          if (riskId < Alert.RISK_INFO || riskId > Alert.RISK_HIGH) {
              throwInvalidRiskId();
          }
          return riskId;
      }
docs: Gets the risk ID from the given {@code parameters}, using {@link #PARAM_RISK} as parameter name.
  
  @param parameters the parameters of the API request.
  @return the ID of the risk, or {@link #NO_RISK_ID} if none provided.
  @throws ApiException if the provided risk ID is not valid (not an integer nor a valid risk ID).