/** * Onboard Api * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: v1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import * as $ from 'jquery'; import * as models from '../model/models'; import { COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; /* tslint:disable:no-unused-variable member-ordering */ export class CertificateApi { protected basePath = 'https://localhost'; public defaultHeaders: Array = []; public defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings = null; public configuration: Configuration = new Configuration(); constructor(basePath?: string, configuration?: Configuration, defaultExtraJQueryAjaxSettings?: JQueryAjaxSettings) { if (basePath) { this.basePath = basePath; } if (configuration) { this.configuration = configuration; } if (defaultExtraJQueryAjaxSettings) { this.defaultExtraJQueryAjaxSettings = defaultExtraJQueryAjaxSettings; } } private extendObj(objA: T2, objB: T2): T1|T2 { for (let key in objB) { if (objB.hasOwnProperty(key)) { objA[key] = objB[key]; } } return objA; } /** * * @param id * @param id2 * @param id3 * @param query * @param query2 * @param query3 */ public getCertificateById(id: string, id2: string, id3: string, query?: models.ReadCertificateQuery, query2?: models.ReadCertificateQuery, query3?: models.ReadCertificateQuery, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Certificate; }> { let localVarPath = this.basePath + '/onboard/certification/Certificate/{Id}'.replace('{' + 'Id' + '}', encodeURIComponent(String(id))).replace('{' + 'Id' + '}', encodeURIComponent(String(id2))).replace('{' + 'Id' + '}', encodeURIComponent(String(id3))); let queryParameters: any = {}; let headerParams: any = {}; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getCertificateById.'); } // verify required parameter 'id2' is not null or undefined if (id2 === null || id2 === undefined) { throw new Error('Required parameter id2 was null or undefined when calling getCertificateById.'); } // verify required parameter 'id3' is not null or undefined if (id3 === null || id3 === undefined) { throw new Error('Required parameter id3 was null or undefined when calling getCertificateById.'); } localVarPath = localVarPath + "?" + $.param(queryParameters); // to determine the Content-Type header let consumes: string[] = [ 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json', 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json', 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json' ]; // to determine the Accept header let produces: string[] = [ 'application/json', 'application/json', 'application/json' ]; // authentication (Bearer) required // oauth required if (this.configuration.accessToken) { let accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headerParams['Authorization'] = 'Bearer ' + accessToken; } // authentication (Subscription_Key) required if (this.configuration.apiKey) { headerParams['Ocp-Apim-Subscription-Key'] = this.configuration.apiKey; } headerParams['Content-Type'] = 'application/json'; let requestOptions: JQueryAjaxSettings = { url: localVarPath, type: 'GET', headers: headerParams, processData: false }; requestOptions.data = JSON.stringify(query3); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } if (extraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); } if (this.defaultExtraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } let dfd = $.Deferred(); $.ajax(requestOptions).then( (data: models.Certificate, textStatus: string, jqXHR: JQueryXHR) => dfd.resolve(jqXHR, data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => dfd.reject(xhr, errorThrown) ); return dfd.promise(); } /** * * @param id * @param id2 * @param id3 * @param query * @param query2 * @param query3 */ public getCertificateById_1(id: string, id2: string, id3: string, query?: models.ReadCertificateQuery, query2?: models.ReadCertificateQuery, query3?: models.ReadCertificateQuery, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Certificate; }> { let localVarPath = this.basePath + '/onboard/certification/Certificate/{Id}'.replace('{' + 'Id' + '}', encodeURIComponent(String(id))).replace('{' + 'Id' + '}', encodeURIComponent(String(id2))).replace('{' + 'Id' + '}', encodeURIComponent(String(id3))); let queryParameters: any = {}; let headerParams: any = {}; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getCertificateById_1.'); } // verify required parameter 'id2' is not null or undefined if (id2 === null || id2 === undefined) { throw new Error('Required parameter id2 was null or undefined when calling getCertificateById_1.'); } // verify required parameter 'id3' is not null or undefined if (id3 === null || id3 === undefined) { throw new Error('Required parameter id3 was null or undefined when calling getCertificateById_1.'); } localVarPath = localVarPath + "?" + $.param(queryParameters); // to determine the Content-Type header let consumes: string[] = [ 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json', 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json', 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json' ]; // to determine the Accept header let produces: string[] = [ 'application/json', 'application/json', 'application/json' ]; // authentication (Bearer) required // oauth required if (this.configuration.accessToken) { let accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headerParams['Authorization'] = 'Bearer ' + accessToken; } // authentication (Subscription_Key) required if (this.configuration.apiKey) { headerParams['Ocp-Apim-Subscription-Key'] = this.configuration.apiKey; } headerParams['Content-Type'] = 'application/json'; let requestOptions: JQueryAjaxSettings = { url: localVarPath, type: 'GET', headers: headerParams, processData: false }; requestOptions.data = JSON.stringify(query3); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } if (extraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); } if (this.defaultExtraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } let dfd = $.Deferred(); $.ajax(requestOptions).then( (data: models.Certificate, textStatus: string, jqXHR: JQueryXHR) => dfd.resolve(jqXHR, data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => dfd.reject(xhr, errorThrown) ); return dfd.promise(); } /** * * @param id * @param id2 * @param id3 * @param query * @param query2 * @param query3 */ public getCertificateById_2(id: string, id2: string, id3: string, query?: models.ReadCertificateQuery, query2?: models.ReadCertificateQuery, query3?: models.ReadCertificateQuery, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Certificate; }> { let localVarPath = this.basePath + '/onboard/certification/Certificate/{Id}'.replace('{' + 'Id' + '}', encodeURIComponent(String(id))).replace('{' + 'Id' + '}', encodeURIComponent(String(id2))).replace('{' + 'Id' + '}', encodeURIComponent(String(id3))); let queryParameters: any = {}; let headerParams: any = {}; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getCertificateById_2.'); } // verify required parameter 'id2' is not null or undefined if (id2 === null || id2 === undefined) { throw new Error('Required parameter id2 was null or undefined when calling getCertificateById_2.'); } // verify required parameter 'id3' is not null or undefined if (id3 === null || id3 === undefined) { throw new Error('Required parameter id3 was null or undefined when calling getCertificateById_2.'); } localVarPath = localVarPath + "?" + $.param(queryParameters); // to determine the Content-Type header let consumes: string[] = [ 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json', 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json', 'application/json-patch+json', 'application/json', 'text/json', 'application/_*+json' ]; // to determine the Accept header let produces: string[] = [ 'application/json', 'application/json', 'application/json' ]; // authentication (Bearer) required // oauth required if (this.configuration.accessToken) { let accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headerParams['Authorization'] = 'Bearer ' + accessToken; } // authentication (Subscription_Key) required if (this.configuration.apiKey) { headerParams['Ocp-Apim-Subscription-Key'] = this.configuration.apiKey; } headerParams['Content-Type'] = 'application/json'; let requestOptions: JQueryAjaxSettings = { url: localVarPath, type: 'GET', headers: headerParams, processData: false }; requestOptions.data = JSON.stringify(query3); if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } if (extraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); } if (this.defaultExtraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } let dfd = $.Deferred(); $.ajax(requestOptions).then( (data: models.Certificate, textStatus: string, jqXHR: JQueryXHR) => dfd.resolve(jqXHR, data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => dfd.reject(xhr, errorThrown) ); return dfd.promise(); } /** * */ public getCertificates(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: Array; }> { let localVarPath = this.basePath + '/onboard/certification/Certificate'; let queryParameters: any = {}; let headerParams: any = {}; localVarPath = localVarPath + "?" + $.param(queryParameters); // to determine the Content-Type header let consumes: string[] = [ ]; // to determine the Accept header let produces: string[] = [ 'application/json', 'application/json', 'application/json' ]; // authentication (Bearer) required // oauth required if (this.configuration.accessToken) { let accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headerParams['Authorization'] = 'Bearer ' + accessToken; } // authentication (Subscription_Key) required if (this.configuration.apiKey) { headerParams['Ocp-Apim-Subscription-Key'] = this.configuration.apiKey; } let requestOptions: JQueryAjaxSettings = { url: localVarPath, type: 'GET', headers: headerParams, processData: false }; if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } if (extraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); } if (this.defaultExtraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } let dfd = $.Deferred(); $.ajax(requestOptions).then( (data: Array, textStatus: string, jqXHR: JQueryXHR) => dfd.resolve(jqXHR, data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => dfd.reject(xhr, errorThrown) ); return dfd.promise(); } /** * */ public getCertificates_3(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: Array; }> { let localVarPath = this.basePath + '/onboard/certification/Certificate'; let queryParameters: any = {}; let headerParams: any = {}; localVarPath = localVarPath + "?" + $.param(queryParameters); // to determine the Content-Type header let consumes: string[] = [ ]; // to determine the Accept header let produces: string[] = [ 'application/json', 'application/json', 'application/json' ]; // authentication (Bearer) required // oauth required if (this.configuration.accessToken) { let accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headerParams['Authorization'] = 'Bearer ' + accessToken; } // authentication (Subscription_Key) required if (this.configuration.apiKey) { headerParams['Ocp-Apim-Subscription-Key'] = this.configuration.apiKey; } let requestOptions: JQueryAjaxSettings = { url: localVarPath, type: 'GET', headers: headerParams, processData: false }; if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } if (extraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); } if (this.defaultExtraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } let dfd = $.Deferred(); $.ajax(requestOptions).then( (data: Array, textStatus: string, jqXHR: JQueryXHR) => dfd.resolve(jqXHR, data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => dfd.reject(xhr, errorThrown) ); return dfd.promise(); } /** * */ public getCertificates_4(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: Array; }> { let localVarPath = this.basePath + '/onboard/certification/Certificate'; let queryParameters: any = {}; let headerParams: any = {}; localVarPath = localVarPath + "?" + $.param(queryParameters); // to determine the Content-Type header let consumes: string[] = [ ]; // to determine the Accept header let produces: string[] = [ 'application/json', 'application/json', 'application/json' ]; // authentication (Bearer) required // oauth required if (this.configuration.accessToken) { let accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headerParams['Authorization'] = 'Bearer ' + accessToken; } // authentication (Subscription_Key) required if (this.configuration.apiKey) { headerParams['Ocp-Apim-Subscription-Key'] = this.configuration.apiKey; } let requestOptions: JQueryAjaxSettings = { url: localVarPath, type: 'GET', headers: headerParams, processData: false }; if (headerParams['Content-Type']) { requestOptions.contentType = headerParams['Content-Type']; } if (extraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, extraJQueryAjaxSettings); } if (this.defaultExtraJQueryAjaxSettings) { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } let dfd = $.Deferred(); $.ajax(requestOptions).then( (data: Array, textStatus: string, jqXHR: JQueryXHR) => dfd.resolve(jqXHR, data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => dfd.reject(xhr, errorThrown) ); return dfd.promise(); } }