/* tslint:disable */
/* eslint-disable */
/**
* TeamCity REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2018.1 (current)
*
*
* 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// @ts-ignore
import {
BASE_PATH,
BaseAPI,
COLLECTION_FORMATS,
type RequestArgs,
RequiredError,
operationServerMap,
} from '../base';
// Some imports not used depending on template conditions
// @ts-ignore
import {
DUMMY_BASE_URL,
assertParamExists,
createRequestFunction,
serializeDataIfNeeded,
setApiKeyToObject,
setBasicAuthToObject,
setBearerAuthToObject,
setOAuthToObject,
setSearchParams,
toPathString,
} from '../common';
import type { Configuration } from '../configuration';
// @ts-ignore
import type { Agent } from '../models';
// @ts-ignore
import type { AgentPool } from '../models';
// @ts-ignore
import type { AgentPools } from '../models';
// @ts-ignore
import type { Agents } from '../models';
// @ts-ignore
import type { AuthorizationTokensRequirements } from '../models';
// @ts-ignore
import type { Items } from '../models';
// @ts-ignore
import type { Project } from '../models';
// @ts-ignore
import type { Projects } from '../models';
/**
* AgentPoolApi - axios parameter creator
* @export
*/
export const AgentPoolApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Assign the agent to the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {Agent} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addAgentToAgentPool: async (
agentPoolLocator: string,
fields?: string,
body?: Agent,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('addAgentToAgentPool', 'agentPoolLocator', agentPoolLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/agents`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
if (fields !== undefined) {
localVarQueryParameter['fields'] = String(fields);
}
localVarHeaderParameter['Content-Type'] = 'application/xml';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
localVarRequestOptions.data = serializeDataIfNeeded(
body,
localVarRequestOptions,
configuration
);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Assign the project to the matching agent pool.
* @param {string} agentPoolLocator
* @param {Project} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addProjectToAgentPool: async (
agentPoolLocator: string,
body?: Project,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('addProjectToAgentPool', 'agentPoolLocator', agentPoolLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/projects`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
localVarHeaderParameter['Content-Type'] = 'application/xml';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
localVarRequestOptions.data = serializeDataIfNeeded(
body,
localVarRequestOptions,
configuration
);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Create a new agent pool.
* @param {AgentPool} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAgentPool: async (
body?: AgentPool,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
const localVarPath = `/app/rest/agentPools`;
// 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, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
localVarHeaderParameter['Content-Type'] = 'application/xml';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
localVarRequestOptions.data = serializeDataIfNeeded(
body,
localVarRequestOptions,
configuration
);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Delete the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAgentPool: async (
agentPoolLocator: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('deleteAgentPool', 'agentPoolLocator', agentPoolLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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: 'DELETE', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Unassign all projects from the matching agent pool.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAllProjectsFromAgentPool: async (
agentPoolLocator: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('deleteAllProjectsFromAgentPool', 'agentPoolLocator', agentPoolLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/projects`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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: 'DELETE', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Unassign the project from the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} projectLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteProjectFromAgentPool: async (
agentPoolLocator: string,
projectLocator: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('deleteProjectFromAgentPool', 'agentPoolLocator', agentPoolLocator);
// verify required parameter 'projectLocator' is not null or undefined
assertParamExists('deleteProjectFromAgentPool', 'projectLocator', projectLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/projects/{projectLocator}`
.replace(`{${'agentPoolLocator'}}`, encodeURIComponent(String(agentPoolLocator)))
.replace(`{${'projectLocator'}}`, encodeURIComponent(String(projectLocator)));
// 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: 'DELETE', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Generates one-time tokens that can be used by agents to be automatically authorized in the specified agent pool upon registration.
* @param {string} agentPoolLocator
* @param {AuthorizationTokensRequirements} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
generateAutomaticAgentAuthorizationTokens: async (
agentPoolLocator: string,
body?: AuthorizationTokensRequirements,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists(
'generateAutomaticAgentAuthorizationTokens',
'agentPoolLocator',
agentPoolLocator
);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/authorizationTokens`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
localVarHeaderParameter['Content-Type'] = 'application/xml';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
localVarRequestOptions.data = serializeDataIfNeeded(
body,
localVarRequestOptions,
configuration
);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAgentPoolOfAgentPool: async (
agentPoolLocator: string,
fields?: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('getAgentPoolOfAgentPool', 'agentPoolLocator', agentPoolLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
if (fields !== undefined) {
localVarQueryParameter['fields'] = String(fields);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get all agent pools.
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllAgentPools: async (
locator?: string,
fields?: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
const localVarPath = `/app/rest/agentPools`;
// 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: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
if (locator !== undefined) {
localVarQueryParameter['locator'] = String(locator);
}
if (fields !== undefined) {
localVarQueryParameter['fields'] = String(fields);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get the agent of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllAgentsFromAgentPool: async (
agentPoolLocator: string,
locator?: string,
fields?: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('getAllAgentsFromAgentPool', 'agentPoolLocator', agentPoolLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/agents`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
if (locator !== undefined) {
localVarQueryParameter['locator'] = String(locator);
}
if (fields !== undefined) {
localVarQueryParameter['fields'] = String(fields);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get all projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllProjectsFromAgentPool: async (
agentPoolLocator: string,
fields?: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('getAllProjectsFromAgentPool', 'agentPoolLocator', agentPoolLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/projects`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
if (fields !== undefined) {
localVarQueryParameter['fields'] = String(fields);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFieldFromAgentPool: async (
agentPoolLocator: string,
field: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('getFieldFromAgentPool', 'agentPoolLocator', agentPoolLocator);
// verify required parameter 'field' is not null or undefined
assertParamExists('getFieldFromAgentPool', 'field', field);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/{field}`
.replace(`{${'agentPoolLocator'}}`, encodeURIComponent(String(agentPoolLocator)))
.replace(`{${'field'}}`, encodeURIComponent(String(field)));
// 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: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Update a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {string} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setAgentPoolField: async (
agentPoolLocator: string,
field: string,
body?: string,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('setAgentPoolField', 'agentPoolLocator', agentPoolLocator);
// verify required parameter 'field' is not null or undefined
assertParamExists('setAgentPoolField', 'field', field);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/{field}`
.replace(`{${'agentPoolLocator'}}`, encodeURIComponent(String(agentPoolLocator)))
.replace(`{${'field'}}`, encodeURIComponent(String(field)));
// 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: 'PUT', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
localVarHeaderParameter['Content-Type'] = 'text/plain';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
localVarRequestOptions.data = serializeDataIfNeeded(
body,
localVarRequestOptions,
configuration
);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Update projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {Projects} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setAgentPoolProjects: async (
agentPoolLocator: string,
body?: Projects,
options: RawAxiosRequestConfig = {}
): Promise<RequestArgs> => {
// verify required parameter 'agentPoolLocator' is not null or undefined
assertParamExists('setAgentPoolProjects', 'agentPoolLocator', agentPoolLocator);
const localVarPath = `/app/rest/agentPools/{agentPoolLocator}/projects`.replace(
`{${'agentPoolLocator'}}`,
encodeURIComponent(String(agentPoolLocator))
);
// 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: 'PUT', ...baseOptions, ...options };
const localVarHeaderParameter = {} as Record<string, string>;
const localVarQueryParameter = {} as Record<string, string>;
localVarHeaderParameter['Content-Type'] = 'application/xml';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {};
localVarRequestOptions.headers = {
...localVarHeaderParameter,
...headersFromBaseOptions,
...options["headers"],
};
localVarRequestOptions.data = serializeDataIfNeeded(
body,
localVarRequestOptions,
configuration
);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* AgentPoolApi - functional programming interface
* @export
*/
export const AgentPoolApiFp = function (configuration?: Configuration) {
const localVarAxiosParamCreator = AgentPoolApiAxiosParamCreator(configuration);
return {
/**
*
* @summary Assign the agent to the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {Agent} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async addAgentToAgentPool(
agentPoolLocator: string,
fields?: string,
body?: Agent,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Agent>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.addAgentToAgentPool(
agentPoolLocator,
fields,
body,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.addAgentToAgentPool']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Assign the project to the matching agent pool.
* @param {string} agentPoolLocator
* @param {Project} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async addProjectToAgentPool(
agentPoolLocator: string,
body?: Project,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Project>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.addProjectToAgentPool(
agentPoolLocator,
body,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.addProjectToAgentPool']?.[localVarOperationServerIndex]
?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Create a new agent pool.
* @param {AgentPool} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createAgentPool(
body?: AgentPool,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentPool>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createAgentPool(body, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.createAgentPool']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Delete the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteAgentPool(
agentPoolLocator: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAgentPool(
agentPoolLocator,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.deleteAgentPool']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Unassign all projects from the matching agent pool.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteAllProjectsFromAgentPool(
agentPoolLocator: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAllProjectsFromAgentPool(
agentPoolLocator,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.deleteAllProjectsFromAgentPool']?.[
localVarOperationServerIndex
]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Unassign the project from the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} projectLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteProjectFromAgentPool(
agentPoolLocator: string,
projectLocator: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProjectFromAgentPool(
agentPoolLocator,
projectLocator,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.deleteProjectFromAgentPool']?.[
localVarOperationServerIndex
]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Generates one-time tokens that can be used by agents to be automatically authorized in the specified agent pool upon registration.
* @param {string} agentPoolLocator
* @param {AuthorizationTokensRequirements} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async generateAutomaticAgentAuthorizationTokens(
agentPoolLocator: string,
body?: AuthorizationTokensRequirements,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Items>> {
const localVarAxiosArgs =
await localVarAxiosParamCreator.generateAutomaticAgentAuthorizationTokens(
agentPoolLocator,
body,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.generateAutomaticAgentAuthorizationTokens']?.[
localVarOperationServerIndex
]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAgentPoolOfAgentPool(
agentPoolLocator: string,
fields?: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentPool>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentPoolOfAgentPool(
agentPoolLocator,
fields,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.getAgentPoolOfAgentPool']?.[localVarOperationServerIndex]
?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get all agent pools.
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllAgentPools(
locator?: string,
fields?: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentPools>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAgentPools(
locator,
fields,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.getAllAgentPools']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get the agent of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllAgentsFromAgentPool(
agentPoolLocator: string,
locator?: string,
fields?: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Agents>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAgentsFromAgentPool(
agentPoolLocator,
locator,
fields,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.getAllAgentsFromAgentPool']?.[localVarOperationServerIndex]
?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get all projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAllProjectsFromAgentPool(
agentPoolLocator: string,
fields?: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Projects>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getAllProjectsFromAgentPool(
agentPoolLocator,
fields,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.getAllProjectsFromAgentPool']?.[
localVarOperationServerIndex
]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getFieldFromAgentPool(
agentPoolLocator: string,
field: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getFieldFromAgentPool(
agentPoolLocator,
field,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.getFieldFromAgentPool']?.[localVarOperationServerIndex]
?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Update a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {string} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async setAgentPoolField(
agentPoolLocator: string,
field: string,
body?: string,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.setAgentPoolField(
agentPoolLocator,
field,
body,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.setAgentPoolField']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Update projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {Projects} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async setAgentPoolProjects(
agentPoolLocator: string,
body?: Projects,
options?: RawAxiosRequestConfig
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Projects>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.setAgentPoolProjects(
agentPoolLocator,
body,
options
);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath =
operationServerMap['AgentPoolApi.setAgentPoolProjects']?.[localVarOperationServerIndex]
?.url;
return (axios, basePath) =>
createRequestFunction(
localVarAxiosArgs,
globalAxios,
BASE_PATH,
configuration
)(axios, localVarOperationServerBasePath || basePath);
},
};
};
/**
* AgentPoolApi - factory interface
* @export
*/
export const AgentPoolApiFactory = function (
configuration?: Configuration,
basePath?: string,
axios?: AxiosInstance
) {
const localVarFp = AgentPoolApiFp(configuration);
return {
/**
*
* @summary Assign the agent to the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {Agent} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addAgentToAgentPool(
agentPoolLocator: string,
fields?: string,
body?: Agent,
options?: RawAxiosRequestConfig
): AxiosPromise<Agent> {
return localVarFp
.addAgentToAgentPool(agentPoolLocator, fields, body, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Assign the project to the matching agent pool.
* @param {string} agentPoolLocator
* @param {Project} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addProjectToAgentPool(
agentPoolLocator: string,
body?: Project,
options?: RawAxiosRequestConfig
): AxiosPromise<Project> {
return localVarFp
.addProjectToAgentPool(agentPoolLocator, body, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Create a new agent pool.
* @param {AgentPool} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAgentPool(body?: AgentPool, options?: RawAxiosRequestConfig): AxiosPromise<AgentPool> {
return localVarFp.createAgentPool(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Delete the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAgentPool(agentPoolLocator: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
return localVarFp
.deleteAgentPool(agentPoolLocator, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Unassign all projects from the matching agent pool.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAllProjectsFromAgentPool(
agentPoolLocator: string,
options?: RawAxiosRequestConfig
): AxiosPromise<void> {
return localVarFp
.deleteAllProjectsFromAgentPool(agentPoolLocator, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Unassign the project from the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} projectLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteProjectFromAgentPool(
agentPoolLocator: string,
projectLocator: string,
options?: RawAxiosRequestConfig
): AxiosPromise<void> {
return localVarFp
.deleteProjectFromAgentPool(agentPoolLocator, projectLocator, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Generates one-time tokens that can be used by agents to be automatically authorized in the specified agent pool upon registration.
* @param {string} agentPoolLocator
* @param {AuthorizationTokensRequirements} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
generateAutomaticAgentAuthorizationTokens(
agentPoolLocator: string,
body?: AuthorizationTokensRequirements,
options?: RawAxiosRequestConfig
): AxiosPromise<Items> {
return localVarFp
.generateAutomaticAgentAuthorizationTokens(agentPoolLocator, body, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Get the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAgentPoolOfAgentPool(
agentPoolLocator: string,
fields?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<AgentPool> {
return localVarFp
.getAgentPoolOfAgentPool(agentPoolLocator, fields, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Get all agent pools.
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllAgentPools(
locator?: string,
fields?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<AgentPools> {
return localVarFp
.getAllAgentPools(locator, fields, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Get the agent of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllAgentsFromAgentPool(
agentPoolLocator: string,
locator?: string,
fields?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<Agents> {
return localVarFp
.getAllAgentsFromAgentPool(agentPoolLocator, locator, fields, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Get all projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAllProjectsFromAgentPool(
agentPoolLocator: string,
fields?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<Projects> {
return localVarFp
.getAllProjectsFromAgentPool(agentPoolLocator, fields, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Get a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFieldFromAgentPool(
agentPoolLocator: string,
field: string,
options?: RawAxiosRequestConfig
): AxiosPromise<string> {
return localVarFp
.getFieldFromAgentPool(agentPoolLocator, field, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Update a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {string} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setAgentPoolField(
agentPoolLocator: string,
field: string,
body?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<string> {
return localVarFp
.setAgentPoolField(agentPoolLocator, field, body, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Update projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {Projects} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setAgentPoolProjects(
agentPoolLocator: string,
body?: Projects,
options?: RawAxiosRequestConfig
): AxiosPromise<Projects> {
return localVarFp
.setAgentPoolProjects(agentPoolLocator, body, options)
.then((request) => request(axios, basePath));
},
};
};
/**
* AgentPoolApi - interface
* @export
* @interface AgentPoolApi
*/
export interface AgentPoolApiInterface {
/**
*
* @summary Assign the agent to the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {Agent} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
addAgentToAgentPool(
agentPoolLocator: string,
fields?: string,
body?: Agent,
options?: RawAxiosRequestConfig
): AxiosPromise<Agent>;
/**
*
* @summary Assign the project to the matching agent pool.
* @param {string} agentPoolLocator
* @param {Project} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
addProjectToAgentPool(
agentPoolLocator: string,
body?: Project,
options?: RawAxiosRequestConfig
): AxiosPromise<Project>;
/**
*
* @summary Create a new agent pool.
* @param {AgentPool} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
createAgentPool(body?: AgentPool, options?: RawAxiosRequestConfig): AxiosPromise<AgentPool>;
/**
*
* @summary Delete the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
deleteAgentPool(agentPoolLocator: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
/**
*
* @summary Unassign all projects from the matching agent pool.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
deleteAllProjectsFromAgentPool(
agentPoolLocator: string,
options?: RawAxiosRequestConfig
): AxiosPromise<void>;
/**
*
* @summary Unassign the project from the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} projectLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
deleteProjectFromAgentPool(
agentPoolLocator: string,
projectLocator: string,
options?: RawAxiosRequestConfig
): AxiosPromise<void>;
/**
*
* @summary Generates one-time tokens that can be used by agents to be automatically authorized in the specified agent pool upon registration.
* @param {string} agentPoolLocator
* @param {AuthorizationTokensRequirements} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
generateAutomaticAgentAuthorizationTokens(
agentPoolLocator: string,
body?: AuthorizationTokensRequirements,
options?: RawAxiosRequestConfig
): AxiosPromise<Items>;
/**
*
* @summary Get the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
getAgentPoolOfAgentPool(
agentPoolLocator: string,
fields?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<AgentPool>;
/**
*
* @summary Get all agent pools.
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
getAllAgentPools(
locator?: string,
fields?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<AgentPools>;
/**
*
* @summary Get the agent of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
getAllAgentsFromAgentPool(
agentPoolLocator: string,
locator?: string,
fields?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<Agents>;
/**
*
* @summary Get all projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
getAllProjectsFromAgentPool(
agentPoolLocator: string,
fields?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<Projects>;
/**
*
* @summary Get a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
getFieldFromAgentPool(
agentPoolLocator: string,
field: string,
options?: RawAxiosRequestConfig
): AxiosPromise<string>;
/**
*
* @summary Update a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {string} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
setAgentPoolField(
agentPoolLocator: string,
field: string,
body?: string,
options?: RawAxiosRequestConfig
): AxiosPromise<string>;
/**
*
* @summary Update projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {Projects} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApiInterface
*/
setAgentPoolProjects(
agentPoolLocator: string,
body?: Projects,
options?: RawAxiosRequestConfig
): AxiosPromise<Projects>;
}
/**
* AgentPoolApi - object-oriented interface
* @export
* @class AgentPoolApi
* @extends {BaseAPI}
*/
export class AgentPoolApi extends BaseAPI implements AgentPoolApiInterface {
/**
*
* @summary Assign the agent to the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {Agent} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public addAgentToAgentPool(
agentPoolLocator: string,
fields?: string,
body?: Agent,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.addAgentToAgentPool(agentPoolLocator, fields, body, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Assign the project to the matching agent pool.
* @param {string} agentPoolLocator
* @param {Project} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public addProjectToAgentPool(
agentPoolLocator: string,
body?: Project,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.addProjectToAgentPool(agentPoolLocator, body, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Create a new agent pool.
* @param {AgentPool} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public createAgentPool(body?: AgentPool, options?: RawAxiosRequestConfig) {
return AgentPoolApiFp(this.configuration)
.createAgentPool(body, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Delete the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public deleteAgentPool(agentPoolLocator: string, options?: RawAxiosRequestConfig) {
return AgentPoolApiFp(this.configuration)
.deleteAgentPool(agentPoolLocator, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Unassign all projects from the matching agent pool.
* @param {string} agentPoolLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public deleteAllProjectsFromAgentPool(agentPoolLocator: string, options?: RawAxiosRequestConfig) {
return AgentPoolApiFp(this.configuration)
.deleteAllProjectsFromAgentPool(agentPoolLocator, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Unassign the project from the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} projectLocator
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public deleteProjectFromAgentPool(
agentPoolLocator: string,
projectLocator: string,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.deleteProjectFromAgentPool(agentPoolLocator, projectLocator, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Generates one-time tokens that can be used by agents to be automatically authorized in the specified agent pool upon registration.
* @param {string} agentPoolLocator
* @param {AuthorizationTokensRequirements} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public generateAutomaticAgentAuthorizationTokens(
agentPoolLocator: string,
body?: AuthorizationTokensRequirements,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.generateAutomaticAgentAuthorizationTokens(agentPoolLocator, body, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get the agent pool matching the locator.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public getAgentPoolOfAgentPool(
agentPoolLocator: string,
fields?: string,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.getAgentPoolOfAgentPool(agentPoolLocator, fields, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get all agent pools.
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public getAllAgentPools(locator?: string, fields?: string, options?: RawAxiosRequestConfig) {
return AgentPoolApiFp(this.configuration)
.getAllAgentPools(locator, fields, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get the agent of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [locator]
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public getAllAgentsFromAgentPool(
agentPoolLocator: string,
locator?: string,
fields?: string,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.getAllAgentsFromAgentPool(agentPoolLocator, locator, fields, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get all projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} [fields]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public getAllProjectsFromAgentPool(
agentPoolLocator: string,
fields?: string,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.getAllProjectsFromAgentPool(agentPoolLocator, fields, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public getFieldFromAgentPool(
agentPoolLocator: string,
field: string,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.getFieldFromAgentPool(agentPoolLocator, field, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Update a field of the matching agent pool.
* @param {string} agentPoolLocator
* @param {string} field
* @param {string} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public setAgentPoolField(
agentPoolLocator: string,
field: string,
body?: string,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.setAgentPoolField(agentPoolLocator, field, body, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Update projects of the matching agent pool.
* @param {string} agentPoolLocator
* @param {Projects} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentPoolApi
*/
public setAgentPoolProjects(
agentPoolLocator: string,
body?: Projects,
options?: RawAxiosRequestConfig
) {
return AgentPoolApiFp(this.configuration)
.setAgentPoolProjects(agentPoolLocator, body, options)
.then((request) => request(this.axios, this.basePath));
}
}