grantConsentToScope(appId, oAuth2ScopeConsentGrant) {
    if (!appId) {
      return Promise.reject(new Error('OKTA API grantConsentToScope parameter appId is required.'));
    }
    if (!oAuth2ScopeConsentGrant) {
      return Promise.reject(new Error('OKTA API grantConsentToScope parameter oAuth2ScopeConsentGrant is required.'));
    }
    let url = `${this.baseUrl}/api/v1/apps/${appId}/grants`;

    const resources = [
      `${this.baseUrl}/api/v1/apps/${appId}`
    ];

    const request = this.http.postJson(
      url,
      {
        body: oAuth2ScopeConsentGrant
      },
      { resources }
    );
    return request.then(jsonRes => new models.OAuth2ScopeConsentGrant(jsonRes, this));
  }
/**
   *
   * @param appId {String}
   * @param {OAuth2ScopeConsentGrant} oAuth2ScopeConsentGrant
   * @description
   * Grants consent for the application to request an OAuth 2.0 Okta scope
   * @returns {Promise<OAuth2ScopeConsentGrant>}
   */
@param appId {String}
@param {OAuth2ScopeConsentGrant} oAuth2ScopeConsentGrant
@description
Grants consent for the application to request an OAuth 2.0 Okta scope
@returns {Promise}
@param appId { String } @param { OAuth2ScopeConsentGrant } oAuth2ScopeConsentGrant @description Grants consent for the application to request an OAuth 2 . 0 Okta scope @returns { Promise }
grantConsentToScope(appId, oAuth2ScopeConsentGrant) {
    if (!appId) {
      return Promise.reject(new Error('OKTA API grantConsentToScope parameter appId is required.'));
    }
    if (!oAuth2ScopeConsentGrant) {
      return Promise.reject(new Error('OKTA API grantConsentToScope parameter oAuth2ScopeConsentGrant is required.'));
    }
    let url = `${this.baseUrl}/api/v1/apps/${appId}/grants`;
    const resources = [
      `${this.baseUrl}/api/v1/apps/${appId}`
    ];
    const request = this.http.postJson(
      url,
      {
        body: oAuth2ScopeConsentGrant
      },
      { resources }
    );
    return request.then(jsonRes => new models.OAuth2ScopeConsentGrant(jsonRes, this));
  }
grantConsentToScope ( appId , oAuth2ScopeConsentGrant ) { if ( ! appId ) { return Promise . reject ( new Error ( 'OKTA API grantConsentToScope parameter appId is required.' ) ) ; } if ( ! oAuth2ScopeConsentGrant ) { return Promise . reject ( new Error ( 'OKTA API grantConsentToScope parameter oAuth2ScopeConsentGrant is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ appId } ` ; const resources = [ ` ${ this . baseUrl } ${ appId } ` ] ; const request = this . http . postJson ( url , { body : oAuth2ScopeConsentGrant } , { resources } ) ; return request . then ( jsonRes => new models . OAuth2ScopeConsentGrant ( jsonRes , this ) ) ; }
@param appId {String}
 @param {OAuth2ScopeConsentGrant} oAuth2ScopeConsentGrant
 @description
 Grants consent for the application to request an OAuth 2.0 Okta scope
 @returns {Promise<OAuth2ScopeConsentGrant>}
@param appId { String } @param { OAuth2ScopeConsentGrant } oAuth2ScopeConsentGrant @description Grants consent for the application to request an OAuth 2 . 0 Okta scope @returns { Promise<OAuth2ScopeConsentGrant > }