/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Machine Account Classify * Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. * * The version of the OpenAPI document: v1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** * * @export * @interface ErrorMessageDto */ export interface ErrorMessageDto { /** * The locale for the message text, a BCP 47 language tag. * @type {string} * @memberof ErrorMessageDto */ 'locale'?: string | null; /** * * @type {LocaleOrigin} * @memberof ErrorMessageDto */ 'localeOrigin'?: LocaleOrigin | null; /** * Actual text of the error message in the indicated locale. * @type {string} * @memberof ErrorMessageDto */ 'text'?: string; } /** * * @export * @interface ErrorResponseDto */ export interface ErrorResponseDto { /** * Fine-grained error code providing more detail of the error. * @type {string} * @memberof ErrorResponseDto */ 'detailCode'?: string; /** * Unique tracking id for the error. * @type {string} * @memberof ErrorResponseDto */ 'trackingId'?: string; /** * Generic localized reason for error * @type {Array} * @memberof ErrorResponseDto */ 'messages'?: Array; /** * Plain-text descriptive reasons to provide additional detail to the text provided in the messages field * @type {Array} * @memberof ErrorResponseDto */ 'causes'?: Array; } /** * An indicator of how the locale was selected. *DEFAULT* means the locale is the system default. *REQUEST* means the locale was selected from the request context (i.e., best match based on the *Accept-Language* header). Additional values may be added in the future without notice. * @export * @enum {string} */ export const LocaleOrigin = { Default: 'DEFAULT', Request: 'REQUEST' } as const; export type LocaleOrigin = typeof LocaleOrigin[keyof typeof LocaleOrigin]; /** * * @export * @interface SendClassifyMachineAccountV1200Response */ export interface SendClassifyMachineAccountV1200Response { /** * Indicates if account is classified as machine * @type {boolean} * @memberof SendClassifyMachineAccountV1200Response */ 'isMachine'?: boolean; } /** * * @export * @interface SendClassifyMachineAccountV1401Response */ export interface SendClassifyMachineAccountV1401Response { /** * A message describing the error * @type {any} * @memberof SendClassifyMachineAccountV1401Response */ 'error'?: any; } /** * * @export * @interface SendClassifyMachineAccountV1429Response */ export interface SendClassifyMachineAccountV1429Response { /** * A message describing the error * @type {any} * @memberof SendClassifyMachineAccountV1429Response */ 'message'?: any; } /** * MachineAccountClassifyApi - axios parameter creator * @export */ export const MachineAccountClassifyApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Use this API to classify a single machine account. A token with API, ORG_ADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Classify single machine account * @param {string} id Account ID. * @param {SendClassifyMachineAccountV1ClassificationModeEnum} [classificationMode] Specifies how the accounts should be classified. default - uses criteria to classify account as machine or human, excludes accounts that were manually classified. ignoreManual - like default, but includes accounts that were manually classified. forceMachine - forces account to be classified as machine. forceHuman - forces account to be classified as human. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ sendClassifyMachineAccountV1: async (id: string, classificationMode?: SendClassifyMachineAccountV1ClassificationModeEnum, xSailPointExperimental?: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('sendClassifyMachineAccountV1', 'id', id) if (xSailPointExperimental === undefined) { xSailPointExperimental = 'true'; } const localVarPath = `/accounts/v1/{id}/classify` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (classificationMode !== undefined) { localVarQueryParameter['classificationMode'] = classificationMode; } if (xSailPointExperimental != null) { localVarHeaderParameter['X-SailPoint-Experimental'] = String(xSailPointExperimental); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * MachineAccountClassifyApi - functional programming interface * @export */ export const MachineAccountClassifyApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = MachineAccountClassifyApiAxiosParamCreator(configuration) return { /** * Use this API to classify a single machine account. A token with API, ORG_ADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Classify single machine account * @param {string} id Account ID. * @param {SendClassifyMachineAccountV1ClassificationModeEnum} [classificationMode] Specifies how the accounts should be classified. default - uses criteria to classify account as machine or human, excludes accounts that were manually classified. ignoreManual - like default, but includes accounts that were manually classified. forceMachine - forces account to be classified as machine. forceHuman - forces account to be classified as human. * @param {string} [xSailPointExperimental] Use this header to enable this experimental API. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async sendClassifyMachineAccountV1(id: string, classificationMode?: SendClassifyMachineAccountV1ClassificationModeEnum, xSailPointExperimental?: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.sendClassifyMachineAccountV1(id, classificationMode, xSailPointExperimental, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MachineAccountClassifyApi.sendClassifyMachineAccountV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * MachineAccountClassifyApi - factory interface * @export */ export const MachineAccountClassifyApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = MachineAccountClassifyApiFp(configuration) return { /** * Use this API to classify a single machine account. A token with API, ORG_ADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Classify single machine account * @param {MachineAccountClassifyApiSendClassifyMachineAccountV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ sendClassifyMachineAccountV1(requestParameters: MachineAccountClassifyApiSendClassifyMachineAccountV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.sendClassifyMachineAccountV1(requestParameters.id, requestParameters.classificationMode, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for sendClassifyMachineAccountV1 operation in MachineAccountClassifyApi. * @export * @interface MachineAccountClassifyApiSendClassifyMachineAccountV1Request */ export interface MachineAccountClassifyApiSendClassifyMachineAccountV1Request { /** * Account ID. * @type {string} * @memberof MachineAccountClassifyApiSendClassifyMachineAccountV1 */ readonly id: string /** * Specifies how the accounts should be classified. default - uses criteria to classify account as machine or human, excludes accounts that were manually classified. ignoreManual - like default, but includes accounts that were manually classified. forceMachine - forces account to be classified as machine. forceHuman - forces account to be classified as human. * @type {'default' | 'ignoreManual' | 'forceMachine' | 'forceHuman'} * @memberof MachineAccountClassifyApiSendClassifyMachineAccountV1 */ readonly classificationMode?: SendClassifyMachineAccountV1ClassificationModeEnum /** * Use this header to enable this experimental API. * @type {string} * @memberof MachineAccountClassifyApiSendClassifyMachineAccountV1 */ readonly xSailPointExperimental?: string } /** * MachineAccountClassifyApi - object-oriented interface * @export * @class MachineAccountClassifyApi * @extends {BaseAPI} */ export class MachineAccountClassifyApi extends BaseAPI { /** * Use this API to classify a single machine account. A token with API, ORG_ADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. * @summary Classify single machine account * @param {MachineAccountClassifyApiSendClassifyMachineAccountV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof MachineAccountClassifyApi */ public sendClassifyMachineAccountV1(requestParameters: MachineAccountClassifyApiSendClassifyMachineAccountV1Request, axiosOptions?: RawAxiosRequestConfig) { return MachineAccountClassifyApiFp(this.configuration).sendClassifyMachineAccountV1(requestParameters.id, requestParameters.classificationMode, requestParameters.xSailPointExperimental, axiosOptions).then((request) => request(this.axios, this.basePath)); } } /** * @export */ export const SendClassifyMachineAccountV1ClassificationModeEnum = { Default: 'default', IgnoreManual: 'ignoreManual', ForceMachine: 'forceMachine', ForceHuman: 'forceHuman' } as const; export type SendClassifyMachineAccountV1ClassificationModeEnum = typeof SendClassifyMachineAccountV1ClassificationModeEnum[keyof typeof SendClassifyMachineAccountV1ClassificationModeEnum];