createGroupRule(groupRule) {
    if (!groupRule) {
      return Promise.reject(new Error('OKTA API createGroupRule parameter groupRule is required.'));
    }
    let url = `${this.baseUrl}/api/v1/groups/rules`;

    const resources = [];

    const request = this.http.postJson(
      url,
      {
        body: groupRule
      },
      { resources }
    );
    return request.then(jsonRes => new models.GroupRule(jsonRes, this));
  }
/**
   *
   * @param {GroupRule} groupRule
   * @description
   * Creates a group rule to dynamically add users to the specified group if they match the condition
   * @returns {Promise<GroupRule>}
   */
@param {GroupRule} groupRule
@description
Creates a group rule to dynamically add users to the specified group if they match the condition
@returns {Promise}
@param { GroupRule } groupRule @description Creates a group rule to dynamically add users to the specified group if they match the condition @returns { Promise }
createGroupRule(groupRule) {
    if (!groupRule) {
      return Promise.reject(new Error('OKTA API createGroupRule parameter groupRule is required.'));
    }
    let url = `${this.baseUrl}/api/v1/groups/rules`;
    const resources = [];
    const request = this.http.postJson(
      url,
      {
        body: groupRule
      },
      { resources }
    );
    return request.then(jsonRes => new models.GroupRule(jsonRes, this));
  }
createGroupRule ( groupRule ) { if ( ! groupRule ) { return Promise . reject ( new Error ( 'OKTA API createGroupRule parameter groupRule is required.' ) ) ; } let url = ` ${ this . baseUrl } ` ; const resources = [ ] ; const request = this . http . postJson ( url , { body : groupRule } , { resources } ) ; return request . then ( jsonRes => new models . GroupRule ( jsonRes , this ) ) ; }
@param {GroupRule} groupRule
 @description
 Creates a group rule to dynamically add users to the specified group if they match the condition
 @returns {Promise<GroupRule>}
@param { GroupRule } groupRule @description Creates a group rule to dynamically add users to the specified group if they match the condition @returns { Promise<GroupRule > }