createAuthorizationServerPolicyRule(policyId, authServerId, authorizationServerPolicyRule) {
    if (!policyId) {
      return Promise.reject(new Error('OKTA API createAuthorizationServerPolicyRule parameter policyId is required.'));
    }
    if (!authServerId) {
      return Promise.reject(new Error('OKTA API createAuthorizationServerPolicyRule parameter authServerId is required.'));
    }
    if (!authorizationServerPolicyRule) {
      return Promise.reject(new Error('OKTA API createAuthorizationServerPolicyRule parameter authorizationServerPolicyRule is required.'));
    }
    let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies/${policyId}/rules`;

    const resources = [
      `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies/${policyId}`,
      `${this.baseUrl}/api/v1/authorizationServers/${authServerId}`
    ];

    const request = this.http.postJson(
      url,
      {
        body: authorizationServerPolicyRule
      },
      { resources }
    );
    return request.then(jsonRes => new models.AuthorizationServerPolicyRule(jsonRes, this));
  }
/**
   *
   * @param policyId {String}
   * @param authServerId {String}
   * @param {AuthorizationServerPolicyRule} authorizationServerPolicyRule
   * @description
   * Creates a policy rule for the specified Custom Authorization Server and Policy.
   * @returns {Promise<AuthorizationServerPolicyRule>}
   */
@param policyId {String}
@param authServerId {String}
@param {AuthorizationServerPolicyRule} authorizationServerPolicyRule
@description
Creates a policy rule for the specified Custom Authorization Server and Policy.
@returns {Promise}
@param policyId { String } @param authServerId { String } @param { AuthorizationServerPolicyRule } authorizationServerPolicyRule @description Creates a policy rule for the specified Custom Authorization Server and Policy . @returns { Promise }
createAuthorizationServerPolicyRule(policyId, authServerId, authorizationServerPolicyRule) {
    if (!policyId) {
      return Promise.reject(new Error('OKTA API createAuthorizationServerPolicyRule parameter policyId is required.'));
    }
    if (!authServerId) {
      return Promise.reject(new Error('OKTA API createAuthorizationServerPolicyRule parameter authServerId is required.'));
    }
    if (!authorizationServerPolicyRule) {
      return Promise.reject(new Error('OKTA API createAuthorizationServerPolicyRule parameter authorizationServerPolicyRule is required.'));
    }
    let url = `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies/${policyId}/rules`;
    const resources = [
      `${this.baseUrl}/api/v1/authorizationServers/${authServerId}/policies/${policyId}`,
      `${this.baseUrl}/api/v1/authorizationServers/${authServerId}`
    ];
    const request = this.http.postJson(
      url,
      {
        body: authorizationServerPolicyRule
      },
      { resources }
    );
    return request.then(jsonRes => new models.AuthorizationServerPolicyRule(jsonRes, this));
  }
createAuthorizationServerPolicyRule ( policyId , authServerId , authorizationServerPolicyRule ) { if ( ! policyId ) { return Promise . reject ( new Error ( 'OKTA API createAuthorizationServerPolicyRule parameter policyId is required.' ) ) ; } if ( ! authServerId ) { return Promise . reject ( new Error ( 'OKTA API createAuthorizationServerPolicyRule parameter authServerId is required.' ) ) ; } if ( ! authorizationServerPolicyRule ) { return Promise . reject ( new Error ( 'OKTA API createAuthorizationServerPolicyRule parameter authorizationServerPolicyRule is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ authServerId } ${ policyId } ` ; const resources = [ ` ${ this . baseUrl } ${ authServerId } ${ policyId } ` , ` ${ this . baseUrl } ${ authServerId } ` ] ; const request = this . http . postJson ( url , { body : authorizationServerPolicyRule } , { resources } ) ; return request . then ( jsonRes => new models . AuthorizationServerPolicyRule ( jsonRes , this ) ) ; }
@param policyId {String}
 @param authServerId {String}
 @param {AuthorizationServerPolicyRule} authorizationServerPolicyRule
 @description
 Creates a policy rule for the specified Custom Authorization Server and Policy.
@param policyId { String } @param authServerId { String } @param { AuthorizationServerPolicyRule } authorizationServerPolicyRule @description Creates a policy rule for the specified Custom Authorization Server and Policy .