/* tslint:disable */ /* eslint-disable */ /** * Sonatype Lifecycle Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.207.0-01 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { ApiPolicyWaiverReasonDTO, } from '../models/index'; import { ApiPolicyWaiverReasonDTOFromJSON, ApiPolicyWaiverReasonDTOToJSON, } from '../models/index'; /** * PolicyWaiverReasonsApi - interface * * @export * @interface PolicyWaiverReasonsApiInterface */ export interface PolicyWaiverReasonsApiInterface { /** * Use this method to retrieve all policy waiver reasons. Permissions required: None * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PolicyWaiverReasonsApiInterface */ getPolicyWaiverReasonsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Use this method to retrieve all policy waiver reasons. Permissions required: None */ getPolicyWaiverReasons(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; } /** * */ export class PolicyWaiverReasonsApi extends runtime.BaseAPI implements PolicyWaiverReasonsApiInterface { /** * Use this method to retrieve all policy waiver reasons. Permissions required: None */ async getPolicyWaiverReasonsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; const tokenString = await token("BearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } let urlPath = `/api/v2/policyWaiverReasons`; const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApiPolicyWaiverReasonDTOFromJSON)); } /** * Use this method to retrieve all policy waiver reasons. Permissions required: None */ async getPolicyWaiverReasons(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getPolicyWaiverReasonsRaw(initOverrides); return await response.value(); } }