code: public RuleEnvelope createRule(RuleCreationInfo ruleInfo, String userId) throws ApiException {
          ApiResponse<RuleEnvelope> resp = createRuleWithHttpInfo(ruleInfo, userId);
          return resp.getData();
      }
docs: Create Rule
  Create a new Rule
  @param ruleInfo Rule object that needs to be added (required)
  @param userId User ID (required)
  @return RuleEnvelope
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body