linkUserToIdentityProvider(idpId, userId, userIdentityProviderLinkRequest) {
    if (!idpId) {
      return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter idpId is required.'));
    }
    if (!userId) {
      return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter userId is required.'));
    }
    if (!userIdentityProviderLinkRequest) {
      return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter userIdentityProviderLinkRequest is required.'));
    }
    let url = `${this.baseUrl}/api/v1/idps/${idpId}/users/${userId}`;

    const resources = [
      `${this.baseUrl}/api/v1/idps/${idpId}/users/${userId}`,
      `${this.baseUrl}/api/v1/idps/${idpId}`
    ];

    const request = this.http.postJson(
      url,
      {
        body: userIdentityProviderLinkRequest
      },
      { resources }
    );
    return request.then(jsonRes => new models.IdentityProviderApplicationUser(jsonRes, this));
  }
/**
   *
   * @param idpId {String}
   * @param userId {String}
   * @param {UserIdentityProviderLinkRequest} userIdentityProviderLinkRequest
   * @description
   * Links an Okta user to an existing Social Identity Provider. This does not support the SAML2 Identity Provider Type
   * @returns {Promise<IdentityProviderApplicationUser>}
   */
@param idpId {String}
@param userId {String}
@param {UserIdentityProviderLinkRequest} userIdentityProviderLinkRequest
@description
Links an Okta user to an existing Social Identity Provider. This does not support the SAML2 Identity Provider Type
@returns {Promise}
@param idpId { String } @param userId { String } @param { UserIdentityProviderLinkRequest } userIdentityProviderLinkRequest @description Links an Okta user to an existing Social Identity Provider . This does not support the SAML2 Identity Provider Type @returns { Promise }
linkUserToIdentityProvider(idpId, userId, userIdentityProviderLinkRequest) {
    if (!idpId) {
      return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter idpId is required.'));
    }
    if (!userId) {
      return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter userId is required.'));
    }
    if (!userIdentityProviderLinkRequest) {
      return Promise.reject(new Error('OKTA API linkUserToIdentityProvider parameter userIdentityProviderLinkRequest is required.'));
    }
    let url = `${this.baseUrl}/api/v1/idps/${idpId}/users/${userId}`;
    const resources = [
      `${this.baseUrl}/api/v1/idps/${idpId}/users/${userId}`,
      `${this.baseUrl}/api/v1/idps/${idpId}`
    ];
    const request = this.http.postJson(
      url,
      {
        body: userIdentityProviderLinkRequest
      },
      { resources }
    );
    return request.then(jsonRes => new models.IdentityProviderApplicationUser(jsonRes, this));
  }
linkUserToIdentityProvider ( idpId , userId , userIdentityProviderLinkRequest ) { if ( ! idpId ) { return Promise . reject ( new Error ( 'OKTA API linkUserToIdentityProvider parameter idpId is required.' ) ) ; } if ( ! userId ) { return Promise . reject ( new Error ( 'OKTA API linkUserToIdentityProvider parameter userId is required.' ) ) ; } if ( ! userIdentityProviderLinkRequest ) { return Promise . reject ( new Error ( 'OKTA API linkUserToIdentityProvider parameter userIdentityProviderLinkRequest is required.' ) ) ; } let url = ` ${ this . baseUrl } ${ idpId } ${ userId } ` ; const resources = [ ` ${ this . baseUrl } ${ idpId } ${ userId } ` , ` ${ this . baseUrl } ${ idpId } ` ] ; const request = this . http . postJson ( url , { body : userIdentityProviderLinkRequest } , { resources } ) ; return request . then ( jsonRes => new models . IdentityProviderApplicationUser ( jsonRes , this ) ) ; }
@param idpId {String}
 @param userId {String}
 @param {UserIdentityProviderLinkRequest} userIdentityProviderLinkRequest
 @description
 Links an Okta user to an existing Social Identity Provider.
@param idpId { String } @param userId { String } @param { UserIdentityProviderLinkRequest } userIdentityProviderLinkRequest @description Links an Okta user to an existing Social Identity Provider .