// tslint:disable /** * 3Di API * 3Di simulation API (latest stable version: v3) Framework release: 3.0.1 3Di core release: 2.3.0.dev0 deployed on: 10:42AM (UTC) on October 04, 2022 * * The version of the OpenAPI document: v3 * Contact: info@nelen-schuurmans.nl * * 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 { BaseEventState, BaseEventStateFromJSON, BaseEventStateToJSON, CurrentVersion, CurrentVersionFromJSON, CurrentVersionToJSON, InlineResponse200, InlineResponse200FromJSON, InlineResponse200ToJSON, InlineResponse2001, InlineResponse2001FromJSON, InlineResponse2001ToJSON, ObstacleEdit, ObstacleEditFromJSON, ObstacleEditToJSON, PersonalAPIKey, PersonalAPIKeyFromJSON, PersonalAPIKeyToJSON, PersonalAPIKeyWithSecret, PersonalAPIKeyWithSecretFromJSON, PersonalAPIKeyWithSecretToJSON, RasterEditUrls, RasterEditUrlsFromJSON, RasterEditUrlsToJSON, Status, StatusFromJSON, StatusToJSON, } from '../models'; export interface PersonalapikeysCreateRequest { data: PersonalAPIKey; } export interface PersonalapikeysDeleteRequest { prefix: string; } export interface PersonalapikeysListRequest { limit?: number; offset?: number; } export interface PersonalapikeysReadRequest { prefix: string; } export interface PersonalapikeysRevokeRequest { prefix: string; } export interface SimulationsEventsObstacleEditsCreateRequest { simulationPk: string; data: ObstacleEdit; } export interface SimulationsEventsObstacleEditsDeleteRequest { id: number; simulationPk: string; } export interface SimulationsEventsObstacleEditsListRequest { simulationPk: string; limit?: number; offset?: number; } export interface SimulationsEventsObstacleEditsPartialUpdateRequest { id: number; simulationPk: string; data: ObstacleEdit; } export interface SimulationsEventsObstacleEditsProcessedRequest { id: number; simulationPk: string; data: BaseEventState; } export interface SimulationsEventsObstacleEditsReadRequest { id: number; simulationPk: string; } export interface SimulationsEventsObstacleEditsRegisterRelatedRastersRequest { id: number; simulationPk: string; } export interface SimulationsEventsObstacleEditsUpdateRequest { id: number; simulationPk: string; data: ObstacleEdit; } /** * no description */ export class V3BetaApi extends runtime.BaseAPI { /** * Personal API keys are used for authentication without password. */ async personalapikeysCreateRaw(requestParameters: PersonalapikeysCreateRequest): Promise> { if (requestParameters.data === null || requestParameters.data === undefined) { throw new runtime.RequiredError('data','Required parameter requestParameters.data was null or undefined when calling personalapikeysCreate.'); } const queryParameters: runtime.HTTPQuery = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/personalapikeys/`, method: 'POST', headers: headerParameters, query: queryParameters, body: PersonalAPIKeyToJSON(requestParameters.data), }); return new runtime.JSONApiResponse(response, (jsonValue) => PersonalAPIKeyWithSecretFromJSON(jsonValue)); } /** * Personal API keys are used for authentication without password. */ async personalapikeysCreate(requestParameters: PersonalapikeysCreateRequest): Promise { const response = await this.personalapikeysCreateRaw(requestParameters); return await response.value(); } /** * Personal API keys are used for authentication without password. */ async personalapikeysDeleteRaw(requestParameters: PersonalapikeysDeleteRequest): Promise> { if (requestParameters.prefix === null || requestParameters.prefix === undefined) { throw new runtime.RequiredError('prefix','Required parameter requestParameters.prefix was null or undefined when calling personalapikeysDelete.'); } const queryParameters: runtime.HTTPQuery = {}; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/personalapikeys/{prefix}/`.replace(`{${"prefix"}}`, encodeURIComponent(String(requestParameters.prefix))), method: 'DELETE', headers: headerParameters, query: queryParameters, }); return new runtime.VoidApiResponse(response); } /** * Personal API keys are used for authentication without password. */ async personalapikeysDelete(requestParameters: PersonalapikeysDeleteRequest): Promise { await this.personalapikeysDeleteRaw(requestParameters); } /** * Personal API keys are used for authentication without password. */ async personalapikeysListRaw(requestParameters: PersonalapikeysListRequest): Promise> { const queryParameters: runtime.HTTPQuery = {}; if (requestParameters.limit !== undefined) { queryParameters['limit'] = requestParameters.limit; } if (requestParameters.offset !== undefined) { queryParameters['offset'] = requestParameters.offset; } 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/personalapikeys/`, method: 'GET', headers: headerParameters, query: queryParameters, }); return new runtime.JSONApiResponse(response, (jsonValue) => InlineResponse200FromJSON(jsonValue)); } /** * Personal API keys are used for authentication without password. */ async personalapikeysList(requestParameters: PersonalapikeysListRequest): Promise { const response = await this.personalapikeysListRaw(requestParameters); return await response.value(); } /** * Personal API keys are used for authentication without password. */ async personalapikeysReadRaw(requestParameters: PersonalapikeysReadRequest): Promise> { if (requestParameters.prefix === null || requestParameters.prefix === undefined) { throw new runtime.RequiredError('prefix','Required parameter requestParameters.prefix was null or undefined when calling personalapikeysRead.'); } const queryParameters: runtime.HTTPQuery = {}; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/personalapikeys/{prefix}/`.replace(`{${"prefix"}}`, encodeURIComponent(String(requestParameters.prefix))), method: 'GET', headers: headerParameters, query: queryParameters, }); return new runtime.JSONApiResponse(response, (jsonValue) => PersonalAPIKeyFromJSON(jsonValue)); } /** * Personal API keys are used for authentication without password. */ async personalapikeysRead(requestParameters: PersonalapikeysReadRequest): Promise { const response = await this.personalapikeysReadRaw(requestParameters); return await response.value(); } /** * Revoke an API key and return the status. */ async personalapikeysRevokeRaw(requestParameters: PersonalapikeysRevokeRequest): Promise> { if (requestParameters.prefix === null || requestParameters.prefix === undefined) { throw new runtime.RequiredError('prefix','Required parameter requestParameters.prefix was null or undefined when calling personalapikeysRevoke.'); } const queryParameters: runtime.HTTPQuery = {}; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/personalapikeys/{prefix}/revoke/`.replace(`{${"prefix"}}`, encodeURIComponent(String(requestParameters.prefix))), method: 'POST', headers: headerParameters, query: queryParameters, }); return new runtime.JSONApiResponse(response, (jsonValue) => PersonalAPIKeyFromJSON(jsonValue)); } /** * Revoke an API key and return the status. */ async personalapikeysRevoke(requestParameters: PersonalapikeysRevokeRequest): Promise { const response = await this.personalapikeysRevokeRaw(requestParameters); return await response.value(); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsCreateRaw(requestParameters: SimulationsEventsObstacleEditsCreateRequest): Promise> { if (requestParameters.simulationPk === null || requestParameters.simulationPk === undefined) { throw new runtime.RequiredError('simulationPk','Required parameter requestParameters.simulationPk was null or undefined when calling simulationsEventsObstacleEditsCreate.'); } if (requestParameters.data === null || requestParameters.data === undefined) { throw new runtime.RequiredError('data','Required parameter requestParameters.data was null or undefined when calling simulationsEventsObstacleEditsCreate.'); } const queryParameters: runtime.HTTPQuery = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/simulations/{simulation_pk}/events/obstacle-edits/`.replace(`{${"simulation_pk"}}`, encodeURIComponent(String(requestParameters.simulationPk))), method: 'POST', headers: headerParameters, query: queryParameters, body: ObstacleEditToJSON(requestParameters.data), }); return new runtime.JSONApiResponse(response, (jsonValue) => ObstacleEditFromJSON(jsonValue)); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsCreate(requestParameters: SimulationsEventsObstacleEditsCreateRequest): Promise { const response = await this.simulationsEventsObstacleEditsCreateRaw(requestParameters); return await response.value(); } /** * destroy resource only if the event has not yet been applied to the associated simulation */ async simulationsEventsObstacleEditsDeleteRaw(requestParameters: SimulationsEventsObstacleEditsDeleteRequest): Promise> { if (requestParameters.id === null || requestParameters.id === undefined) { throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling simulationsEventsObstacleEditsDelete.'); } if (requestParameters.simulationPk === null || requestParameters.simulationPk === undefined) { throw new runtime.RequiredError('simulationPk','Required parameter requestParameters.simulationPk was null or undefined when calling simulationsEventsObstacleEditsDelete.'); } const queryParameters: runtime.HTTPQuery = {}; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/simulations/{simulation_pk}/events/obstacle-edits/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"simulation_pk"}}`, encodeURIComponent(String(requestParameters.simulationPk))), method: 'DELETE', headers: headerParameters, query: queryParameters, }); return new runtime.VoidApiResponse(response); } /** * destroy resource only if the event has not yet been applied to the associated simulation */ async simulationsEventsObstacleEditsDelete(requestParameters: SimulationsEventsObstacleEditsDeleteRequest): Promise { await this.simulationsEventsObstacleEditsDeleteRaw(requestParameters); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsListRaw(requestParameters: SimulationsEventsObstacleEditsListRequest): Promise> { if (requestParameters.simulationPk === null || requestParameters.simulationPk === undefined) { throw new runtime.RequiredError('simulationPk','Required parameter requestParameters.simulationPk was null or undefined when calling simulationsEventsObstacleEditsList.'); } const queryParameters: runtime.HTTPQuery = {}; if (requestParameters.limit !== undefined) { queryParameters['limit'] = requestParameters.limit; } if (requestParameters.offset !== undefined) { queryParameters['offset'] = requestParameters.offset; } 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/simulations/{simulation_pk}/events/obstacle-edits/`.replace(`{${"simulation_pk"}}`, encodeURIComponent(String(requestParameters.simulationPk))), method: 'GET', headers: headerParameters, query: queryParameters, }); return new runtime.JSONApiResponse(response, (jsonValue) => InlineResponse2001FromJSON(jsonValue)); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsList(requestParameters: SimulationsEventsObstacleEditsListRequest): Promise { const response = await this.simulationsEventsObstacleEditsListRaw(requestParameters); return await response.value(); } /** * when the simulation has started only the duration parameter might be patched */ async simulationsEventsObstacleEditsPartialUpdateRaw(requestParameters: SimulationsEventsObstacleEditsPartialUpdateRequest): Promise> { if (requestParameters.id === null || requestParameters.id === undefined) { throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling simulationsEventsObstacleEditsPartialUpdate.'); } if (requestParameters.simulationPk === null || requestParameters.simulationPk === undefined) { throw new runtime.RequiredError('simulationPk','Required parameter requestParameters.simulationPk was null or undefined when calling simulationsEventsObstacleEditsPartialUpdate.'); } if (requestParameters.data === null || requestParameters.data === undefined) { throw new runtime.RequiredError('data','Required parameter requestParameters.data was null or undefined when calling simulationsEventsObstacleEditsPartialUpdate.'); } const queryParameters: runtime.HTTPQuery = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/simulations/{simulation_pk}/events/obstacle-edits/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"simulation_pk"}}`, encodeURIComponent(String(requestParameters.simulationPk))), method: 'PATCH', headers: headerParameters, query: queryParameters, body: ObstacleEditToJSON(requestParameters.data), }); return new runtime.VoidApiResponse(response); } /** * when the simulation has started only the duration parameter might be patched */ async simulationsEventsObstacleEditsPartialUpdate(requestParameters: SimulationsEventsObstacleEditsPartialUpdateRequest): Promise { await this.simulationsEventsObstacleEditsPartialUpdateRaw(requestParameters); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsProcessedRaw(requestParameters: SimulationsEventsObstacleEditsProcessedRequest): Promise> { if (requestParameters.id === null || requestParameters.id === undefined) { throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling simulationsEventsObstacleEditsProcessed.'); } if (requestParameters.simulationPk === null || requestParameters.simulationPk === undefined) { throw new runtime.RequiredError('simulationPk','Required parameter requestParameters.simulationPk was null or undefined when calling simulationsEventsObstacleEditsProcessed.'); } if (requestParameters.data === null || requestParameters.data === undefined) { throw new runtime.RequiredError('data','Required parameter requestParameters.data was null or undefined when calling simulationsEventsObstacleEditsProcessed.'); } const queryParameters: runtime.HTTPQuery = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/simulations/{simulation_pk}/events/obstacle-edits/{id}/processed/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"simulation_pk"}}`, encodeURIComponent(String(requestParameters.simulationPk))), method: 'PUT', headers: headerParameters, query: queryParameters, body: BaseEventStateToJSON(requestParameters.data), }); return new runtime.VoidApiResponse(response); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsProcessed(requestParameters: SimulationsEventsObstacleEditsProcessedRequest): Promise { await this.simulationsEventsObstacleEditsProcessedRaw(requestParameters); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsReadRaw(requestParameters: SimulationsEventsObstacleEditsReadRequest): Promise> { if (requestParameters.id === null || requestParameters.id === undefined) { throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling simulationsEventsObstacleEditsRead.'); } if (requestParameters.simulationPk === null || requestParameters.simulationPk === undefined) { throw new runtime.RequiredError('simulationPk','Required parameter requestParameters.simulationPk was null or undefined when calling simulationsEventsObstacleEditsRead.'); } const queryParameters: runtime.HTTPQuery = {}; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/simulations/{simulation_pk}/events/obstacle-edits/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"simulation_pk"}}`, encodeURIComponent(String(requestParameters.simulationPk))), method: 'GET', headers: headerParameters, query: queryParameters, }); return new runtime.JSONApiResponse(response, (jsonValue) => ObstacleEditFromJSON(jsonValue)); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsRead(requestParameters: SimulationsEventsObstacleEditsReadRequest): Promise { const response = await this.simulationsEventsObstacleEditsReadRaw(requestParameters); return await response.value(); } /** * Skips registering of related rasters when the simulation is not in the state \'starting\' or \'initialized\'. In this case the urls will be empty * Register all related rasters in the results-api and return read_bbox urls of the registered rasters */ async simulationsEventsObstacleEditsRegisterRelatedRastersRaw(requestParameters: SimulationsEventsObstacleEditsRegisterRelatedRastersRequest): Promise>> { if (requestParameters.id === null || requestParameters.id === undefined) { throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling simulationsEventsObstacleEditsRegisterRelatedRasters.'); } if (requestParameters.simulationPk === null || requestParameters.simulationPk === undefined) { throw new runtime.RequiredError('simulationPk','Required parameter requestParameters.simulationPk was null or undefined when calling simulationsEventsObstacleEditsRegisterRelatedRasters.'); } const queryParameters: runtime.HTTPQuery = {}; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/simulations/{simulation_pk}/events/obstacle-edits/{id}/register_related_rasters/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"simulation_pk"}}`, encodeURIComponent(String(requestParameters.simulationPk))), method: 'GET', headers: headerParameters, query: queryParameters, }); return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(RasterEditUrlsFromJSON)); } /** * Skips registering of related rasters when the simulation is not in the state \'starting\' or \'initialized\'. In this case the urls will be empty * Register all related rasters in the results-api and return read_bbox urls of the registered rasters */ async simulationsEventsObstacleEditsRegisterRelatedRasters(requestParameters: SimulationsEventsObstacleEditsRegisterRelatedRastersRequest): Promise> { const response = await this.simulationsEventsObstacleEditsRegisterRelatedRastersRaw(requestParameters); return await response.value(); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsUpdateRaw(requestParameters: SimulationsEventsObstacleEditsUpdateRequest): Promise> { if (requestParameters.id === null || requestParameters.id === undefined) { throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling simulationsEventsObstacleEditsUpdate.'); } if (requestParameters.simulationPk === null || requestParameters.simulationPk === undefined) { throw new runtime.RequiredError('simulationPk','Required parameter requestParameters.simulationPk was null or undefined when calling simulationsEventsObstacleEditsUpdate.'); } if (requestParameters.data === null || requestParameters.data === undefined) { throw new runtime.RequiredError('data','Required parameter requestParameters.data was null or undefined when calling simulationsEventsObstacleEditsUpdate.'); } const queryParameters: runtime.HTTPQuery = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/simulations/{simulation_pk}/events/obstacle-edits/{id}/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"simulation_pk"}}`, encodeURIComponent(String(requestParameters.simulationPk))), method: 'PUT', headers: headerParameters, query: queryParameters, body: ObstacleEditToJSON(requestParameters.data), }); return new runtime.JSONApiResponse(response, (jsonValue) => ObstacleEditFromJSON(jsonValue)); } /** * A simple ViewSet for viewing obstacle edits */ async simulationsEventsObstacleEditsUpdate(requestParameters: SimulationsEventsObstacleEditsUpdateRequest): Promise { const response = await this.simulationsEventsObstacleEditsUpdateRaw(requestParameters); return await response.value(); } /** */ async statusCurrentVersionRaw(): Promise> { const queryParameters: runtime.HTTPQuery = {}; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/status/current-version/`, method: 'GET', headers: headerParameters, query: queryParameters, }); return new runtime.JSONApiResponse(response, (jsonValue) => CurrentVersionFromJSON(jsonValue)); } /** */ async statusCurrentVersion(): Promise { const response = await this.statusCurrentVersionRaw(); return await response.value(); } /** */ async statusListRaw(): Promise> { const queryParameters: runtime.HTTPQuery = {}; 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.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication } if (this.configuration && this.configuration.accessToken) { // oauth required if (typeof this.configuration.accessToken === 'function') { headerParameters["Authorization"] = this.configuration.accessToken("OAuth2", []); } else { headerParameters["Authorization"] = this.configuration.accessToken; } } const response = await this.request({ path: `/v3-beta/status/`, method: 'GET', headers: headerParameters, query: queryParameters, }); return new runtime.JSONApiResponse(response, (jsonValue) => StatusFromJSON(jsonValue)); } /** */ async statusList(): Promise { const response = await this.statusListRaw(); return await response.value(); } }